balderdashy / sails.io.js

Browser SDK for communicating w/ Sails via sockets
https://sailsjs.com/documentation/reference/web-sockets/socket-client
183 stars 118 forks source link

fix for requestQueue when re-connecting #41

Closed JasonMore closed 8 years ago

JasonMore commented 9 years ago

When making calls during a disconnected state, they were being lost in the requestQueue if it was any time after the initial launch of the app. This change fixes that.

I tried to make a unit test for it but I couldn't figure out how to reliably simulate a sails.lower and sails.lift again so the test would reconnect.

sgress454 commented 8 years ago

Hi @JasonMore, thanks for this. Turned out to be a lot of moving parts on this one, but we now have both the event and request queues working correctly when reconnecting (both from a manual and an involuntary disconnect). Sorry we weren't able to merge this but appreciate your pointing this out!