SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

Fix websocket unable to reconnect to skygear-server hosted with docker #243

Closed Steven-Chan closed 5 years ago

Steven-Chan commented 5 years ago

When connecting to skygear-server in docker and kill the docker container, the socket closed function get called multiple time, however the first attempt of reconnecting would never success, while it blocks the subsequent attempts.

Clearing the state would make the websocket return to the reconnect flow, and when server restarted, the websocket would reconnect normally. However, socket did close would still be called multiple times.

connect oursky/skygear-support#104