DyKnow / SignalR-ObjC

Objective-C Client for the SignalR Project works with iOS and Mac
MIT License
442 stars 213 forks source link

Invalid State: Cannot call send: until connection is open #282

Open BeatBear opened 7 years ago

BeatBear commented 7 years ago

pls,help me

ljs19923 commented 7 years ago

same problem...

MusabBasheer commented 7 years ago

@BeatBear you must wait until connection open to invoke any method

tristandl commented 6 years ago

i have this issue, and i'm not sending until the SRConnection notifies me i the start block. it's only happened once, but i'm trying to work out why this is crashing our live app, to prevent it happening again.

afaict, the websocket transport will not report to the connection that the connection is connected, until the transport is started and the socket is open, but i can't really tell by digging through the SRWebSocketTransport and SRWebSocket code - it seems that when some headers are received didConnect is called, but i can't see how those headers get passed through (seems to be from safeHandleEvent but I can't see anyone calling that)