Handing websocket disconnect

52 views
Skip to first unread message

haskel...@gmail.com

unread,
May 20, 2015, 3:35:36 AM5/20/15
to haste-c...@googlegroups.com
Hi,

  I like the "magic" of "Client ()" and "Server ()" and being able to call Server functions from the Client side.

  I have a few questions:

(1) What happens when the websocket gets disconnected / times out? [Where is this documented?]

(2) Is there a way I can "manually control" what happens when a websocket gets disconnected?

Thanks!

Anton Ekblad

unread,
May 23, 2015, 4:24:45 AM5/23/15
to haste-c...@googlegroups.com, haskel...@gmail.com
This error handling is unfortunately not exposed to the user yet. What the appropriate response to such an error is, is in fact a bit of an open question. Just raise an error at the user? Suspend execution until the connection can be resumed? Do both, or something else entirely?

We hope to write a followup paper that, among other things, addresses error handling, but so far there hasn't been any significant work on this I'm afraid.

/Anton

wukong sun

unread,
May 23, 2015, 8:11:48 PM5/23/15
to Anton Ekblad, haste-c...@googlegroups.com
I'm interested in this purely from a practical perspective (not a research perspective).

1) What happens when the websocket disconnects / times out ? Is this behavior well defined?

2) In practice, what am I supposed to do to defend against this? Telling the end user "you have to periodically hit the refresh button because our framework might silently disconnect when the websocket times out" is not acceptable in practice.

--
You received this message because you are subscribed to the Google Groups "haste-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haste-compile...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

rse...@gmail.com

unread,
May 25, 2015, 2:25:40 AM5/25/15
to haste-c...@googlegroups.com, haskel...@gmail.com
I would expect the websocket to try to reconnect. Only if it fails at that would it raise an error.

//Emil

haskel...@gmail.com

unread,
May 25, 2015, 2:08:54 PM5/25/15
to haste-c...@googlegroups.com, haskel...@gmail.com
With all due respect, I want to know what actually happens, not what you expect to happen.

Can you point me at the lines of code that supports your claim?
Reply all
Reply to author
Forward
0 new messages