You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onClient() callback is triggered early, as soon as the client connects with TCP. This allows the server to react on the remote address, for instance. The path is available only after handshake is finished, which happens in parallel and probably won't be finished when onClient() is scheduled. To be sure the path is available, you should read it in the onOpen() callback, which is triggered after a successful handshake.
I am converting
ws
to native WebSocket functions.Sometimes app can not read
path
.I added a workaround for now here
https://github.com/murat-dogan/node-datachannel/blob/c311c111bdd1b3c20d056f6f46a7c3c12610f8ce/examples/client-server/signaling-server.js#L11
The problem is related to this line
libdatachannel/src/websocket.cpp
Line 68 in 67e88a6
When
onClient
callback is called, it is still inConnecting
state (handshake->path()
is valid though)Can we remove this condition, or there are some other reasons?
The text was updated successfully, but these errors were encountered: