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

Handle disconnects gracefully #121

Closed sgress454 closed 6 years ago

sgress454 commented 6 years ago

Maintains a list of request callbacks (to be called w/ an error in case of disconnect), and a list of request contexts (to mark them as having called their callbacks when relevant, to avoid double-calls)

mikermcneil commented 6 years ago

@sgress454 thanks!

@pharos42 For some reason I can't quite put my finger on, I think backporting for the for-sails-0.12 branch is the only way to get 0.12 compat. (I remember there might have been some incompatibilities aside from just the bundled socket.io client version). Either way, probably safest just to approach it that way