question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document disconnect reasons

See original GitHub issue

You want to:

  • [] report a bug
  • request a feature

Current behaviour

No documentation.

Steps to reproduce (if the current behaviour is a bug)

Look at documentation.

Expected behaviour

It would be so great if there were some official documentation on the possible values for the “reason” value passed to the server side disconnect callback. Some I can discover on my own and make good guesses at (“ping timeout”) but others are less clear (“transport close”).

I’d like to try to handle some of them in different ways (and also for debugging purposes) but without knowing the possibilities or what they mean, it is rather difficult.

I have found:

  • “ping timeout”: client stopped responding to pings in the allotted amount of time (per the pingTimeout config setting).
  • “transport close”: this appears to happen if the client side stopped sending data at all… or maybe there’s some kind of callback causing this to happen. I can see it happen if I just close a tab or follow a link from a page where I have an active connection to the server. But I’m not clear if this is always a case of the client causing it to happen.
  • “Client namespace disconnect”: When the client sends a disconnect packet (client.disconnect()) “server namespace disconnect”: Looks to be when the server performs a socket.disconnect() action.
  • “Transport error”: An error occurred, I assume this is a server side error, but I’m not totally clear, as I’ve not been able to trigger one on my own.

I’d be willing to do a pull request for the docs, but I am wary of adding in wrong/incomplete information without some further confirmation.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:17
  • Comments:9

github_iconTop GitHub Comments

4reactions
mkhahanicommented, Jan 15, 2020

Sorry for re-opening the issue. Regarding the transport close that is the reason when page is closed/reloaded, it also happens some times in bad network conditions specifically when the ping packets are not delivered to the client. For the latter I need to handle it in the server side by waiting for the client to reconnect. Is there a way to properly distinguish between these two?

4reactions
c1moorecommented, Feb 20, 2019

It looks like this documentation now exists here for anybody that gets to this issue from Google.

Read more comments on GitHub >

github_iconTop Results From Across the Web

disconnect(reason:options:completionHandler:)
Returns a newly created file provider manager for the specified domain. ... Creates a new domain that takes ownership of on-disk data that...
Read more >
Extra Disconnect Reason Codes - SBC Core 6.2.x ...
Rejected due to invalid coding because either: Calling Party's Number (CPN) and Charge Number (CHG) are present but Originating Line Information ...
Read more >
Interpreting NextPort Disconnect Reason Codes - Cisco
This document describes how to interpret the call disconnect reason codes reported by Cisco NextPort universal digital signal processor ...
Read more >
Addressing the Document Disconnect. Hidden Opportunity ...
Disconnected document processes can be found in every department, and they have a very significant negative impact on the organization. They: • Adversely...
Read more >
Device disconnect reasons - Digi International
The device was disconnected by the Remote Manager server but no disconnect reason was given. It is common to see this disconnect around...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found