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

Sudph does not close properly #892

Open
jdknives opened this issue Sep 23, 2021 · 1 comment
Open

Sudph does not close properly #892

jdknives opened this issue Sep 23, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jdknives
Copy link
Member

Describe the bug
sudph transport do not close properly. When one edge of the transport closes the transport the other edge does not get notified. Consequently it treats the transport as alive and may write to it or fail to act on the transport being down. This was first noted by @i-hate-nicknames in #842

Steps to Reproduce
Steps to reproduce the behavior:

  1. Open sudph transport
  2. Close the sudph transport
  3. Observe that the remote edge is not closing the transport on its edge

Possible implementation
This is likely the result of sudph using kcp library which may not support the needed shutdown behavior. Maybe it can be configured to do so.

@jdknives jdknives added the bug Something isn't working label Sep 23, 2021
@alexadhy
Copy link
Contributor

alexadhy commented Oct 14, 2021

Adding this for future notes:

The reliability and ordering capabilities of kcp-go seems to be implemented in smux package by the same author.

It does so by sending keepalives between connected edges / nodes. https://github.com/xtaci/smux/blob/09e2c01560df5aaaed50e48e77547858e2623498/session.go#L385

We can do something similar to it, and notify both nodes if transport is offline / closed and delete it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants