Closed Bug 1123537 Opened 9 years ago Closed 9 years ago

[LayerScope] Detect disconnects on clients when the websocket server crashes or disconnects incidentally

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: boris, Assigned: boris)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

According to https://github.com/mozilla/layerscope/issues/6, it is better to let the layerscope UI realize that the layerscope server(b2g or brower) has gone down.
Blocks: LayerScope
Whiteboard: [gfx-noted]
Summary: [LayerScope] Detect disconnects → (LayerScope) Detect disconnects
Whiteboard: [gfx-noted]
I'm not sure what any of this means..
Assignee: nobody → boris.chiou
Whiteboard: [gfx-noted]
I'm not sure which part is unclear ... imagine you're running a layerscope server in Firefox, and then Firefox crashes.  The server socket has just died.  However, the layerscope client, the UI, still says that it's connected to the server.  That UX is confusing.  Make sense?

So, the proposed fix is to somehow have the client detect when the server socket dies.  Then the UI can indicate it's disconnected, and possibly attempt to reconnect.
(In reply to Chris Jones [:cjones] inactive; ni?/f?/r? if you need me from comment #2)
> I'm not sure which part is unclear ... imagine you're running a layerscope
> server in Firefox, and then Firefox crashes.  The server socket has just
> died.  However, the layerscope client, the UI, still says that it's
> connected to the server.  That UX is confusing.  Make sense?
> 
> So, the proposed fix is to somehow have the client detect when the server
> socket dies.  Then the UI can indicate it's disconnected, and possibly
> attempt to reconnect.

OK, I will take a look at this problem. Thanks for your clarification.
Summary: (LayerScope) Detect disconnects → (LayerScope) Detect disconnects on client side when the websocket server crashes or disconnects incidentally
Summary: (LayerScope) Detect disconnects on client side when the websocket server crashes or disconnects incidentally → [LayerScope] Detect disconnects on clients when the websocket server crashes or disconnects incidentally
(In reply to Bas Schouten (:bas.schouten) from comment #1)
> I'm not sure what any of this means..

Sorry, I think the title is not clear enough. According to Chris' explanation, I changed the bug summary to clarify the purpose of this bug. Thanks.
(In reply to Boris Chiou [:boris] from comment #5)
> Created attachment 8557759 [details]
> github commit - Add event listener for connection close

Root cause: we didn't handle socket close event on the client side before.
In this patch, I added an event listener for socket close.

Merged into mozilla/layerscope master branch and close the issue: https://github.com/mozilla/layerscope/issues/6
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: