Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[asyncio] Client disconnects from server without pinging it. #55

Open
johnlage opened this issue Oct 29, 2016 · 4 comments
Open

[asyncio] Client disconnects from server without pinging it. #55

johnlage opened this issue Oct 29, 2016 · 4 comments

Comments

@johnlage
Copy link

Some servers base sending PING messages on the last time the client sent data to the server, causing the client to thing that it has disconnected from not receiving data. Instead, the client should PING the server to check if it is still connected.

@shizmob
Copy link
Owner

shizmob commented Oct 30, 2016

RFC1459, section 4.6.2 seems to imply the PING message can only be sent by servers to clients, not vice-versa. Code to do something like this was actually in pydle a while ago, but I removed it because of this.

Could you point me to servers which base their PING messages off of this? I'd like to inspect their implementation.

@johnlage
Copy link
Author

Actually, referencing that RFC it says "A PING message is sent at regular intervals if no other activity detected coming from a connection." I found this problem while connected to EsperNet, which uses charybdis, although they may have customized this particular thing.

@shizmob
Copy link
Owner

shizmob commented Oct 30, 2016

Just realised that it also states: "Servers should not respond to PING commands but rely on PINGs from the other end of the connection to indicate the connection is alive.", which makes this a valid implementation indeed. Definitely going to be putting back that code, then.

@johnlage
Copy link
Author

Oh I just realized that the problem I was experiencing may not be solved by the fix you proposed, because the timeout was on pydle's side, not on the serverside (pydle closed the connection due to not recieving input.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants