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
I can submit a sample project to prove the issue, but it appears that callbacks are being referenced from different instances of TcpSocketClient and failing.
TcpSockets creates an instance of TcpSocketClient at init. Then, on first client connection, a new TcpSocketClient instance is created by TcpSockets, but the callbacks from write are saved in the first instances's _pendingSends. When the message is written to the socket and the callback is requested to call, the second instance checks it's own _pendingSends for the callback and cannot locate it. This causes a lock on writes after the first message is sent.
I have a fix which moves the _pendingWrites queue (and _sendTag) to the delegate and handled centrally through delegate handlers. Will submit a PR.
The text was updated successfully, but these errors were encountered:
beau6183
pushed a commit
to beau6183/react-native-tcp
that referenced
this issue
Sep 7, 2018
I can submit a sample project to prove the issue, but it appears that callbacks are being referenced from different instances of
TcpSocketClient
and failing.TcpSockets
creates an instance ofTcpSocketClient
atinit
. Then, on first client connection, a newTcpSocketClient
instance is created byTcpSockets
, but the callbacks from write are saved in the first instances's_pendingSends
. When the message is written to the socket and the callback is requested to call, the second instance checks it's own_pendingSends
for the callback and cannot locate it. This causes a lock on writes after the first message is sent.I have a fix which moves the
_pendingWrites
queue (and _sendTag) to the delegate and handled centrally through delegate handlers. Will submit a PR.The text was updated successfully, but these errors were encountered: