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
{{ message }}
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
First thanks for the great library.
After some digging in the code I have a question regarding thread safety. I am new to iOS so I may be mistaken here.
It seems to me that there could be races in the code between the flows that handle incoming messages and calls that the library user performs. For instance, when the user calls:
callMethodName:parameters:responseCallback
the flow eventually adds entries to _responseCallbacks (a NSMutableDictionary) and to _methodIds (a NSMutableSet). Both are used and manipulated when receiving callbacks from the SRWebSocket.
Now there is a provision for this to work correctly via [SWWebSocket setDelegateDispatchQueue] but connectWebSocket does not wait for the user to set the dispatch queue before connecting so at least the first callback might happen on the wrong dispatch queue.
Am I missing something?
Should a member be added to ObjectiveDDP that will hold the dispatch queue to use with the SRWebSocket?
Thanks,
Shai
The text was updated successfully, but these errors were encountered:
First thanks for the great library.
After some digging in the code I have a question regarding thread safety. I am new to iOS so I may be mistaken here.
It seems to me that there could be races in the code between the flows that handle incoming messages and calls that the library user performs. For instance, when the user calls:
callMethodName:parameters:responseCallback
the flow eventually adds entries to _responseCallbacks (a NSMutableDictionary) and to _methodIds (a NSMutableSet). Both are used and manipulated when receiving callbacks from the SRWebSocket.
Now there is a provision for this to work correctly via [SWWebSocket setDelegateDispatchQueue] but connectWebSocket does not wait for the user to set the dispatch queue before connecting so at least the first callback might happen on the wrong dispatch queue.
Am I missing something?
Should a member be added to ObjectiveDDP that will hold the dispatch queue to use with the SRWebSocket?
Thanks,
Shai
The text was updated successfully, but these errors were encountered: