Skip to content

Commit f29906c

Browse files
authored
Allow building without rtti (#487)
Since factory returns a ProxyConnectionState, setOnConnectionCallback will be a ProxyConnectionState. The code already makes that assumption, since it does not check of state return value. Using a static_pointer_cast will allow the library to be build with rtti.
1 parent 872f516 commit f29906c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ixwebsocket/IXWebSocketProxyServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace ix
5757
server.setOnConnectionCallback(
5858
[remoteUrl, remoteUrlsMapping](std::weak_ptr<ix::WebSocket> webSocket,
5959
std::shared_ptr<ConnectionState> connectionState) {
60-
auto state = std::dynamic_pointer_cast<ProxyConnectionState>(connectionState);
60+
auto state = std::static_pointer_cast<ProxyConnectionState>(connectionState);
6161
auto remoteIp = connectionState->getRemoteIp();
6262

6363
// Server connection

0 commit comments

Comments
 (0)