[GH-ISSUE #147] Singleplex UDP doesn't ever close any opened sessions #118

Closed
opened 2026-02-26 12:34:02 +03:00 by kerem · 4 comments
Owner

Originally created by @notsure2 on GitHub (Dec 22, 2020).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/147

i see sessions being correctly opened on every new connection tuple, however they are never getting closed even after StreamTimeout passed. In case of UDP streams need to timeout if no data is sent or received within StreamTimeout. (Only UDP).

@cbeuw

I will see if I can make a pull request on this.

Originally created by @notsure2 on GitHub (Dec 22, 2020). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/147 i see sessions being correctly opened on every new connection tuple, however they are never getting closed even after StreamTimeout passed. In case of UDP streams need to timeout if no data is sent or received within StreamTimeout. (Only UDP). @cbeuw I will see if I can make a pull request on this.
kerem closed this issue 2026-02-26 12:34:02 +03:00
Author
Owner

@notsure2 commented on GitHub (Dec 22, 2020):

Note: It's not not enough to set a read timeout or write timeout from one side. Any activity in send or receive needs to reset the timer.

<!-- gh-comment-id:749769751 --> @notsure2 commented on GitHub (Dec 22, 2020): Note: It's not not enough to set a read timeout or write timeout from one side. Any activity in send or receive needs to reset the timer.
Author
Owner

@cbeuw commented on GitHub (Dec 22, 2020):

I was aware of this. I'm thinking of adding a new config option specific to UDP because StreamTimeout is currently being used to close the incoming connection on the client side if they don't send anything. The UDP timeout is something quite different

<!-- gh-comment-id:749771114 --> @cbeuw commented on GitHub (Dec 22, 2020): I was aware of this. I'm thinking of adding a new config option specific to UDP because StreamTimeout is currently being used to close the incoming connection on the client side if they don't send anything. The UDP timeout is something quite different
Author
Owner

@notsure2 commented on GitHub (Dec 22, 2020):

I think it's fine to reuse the StreamTimeout meaning for UDP mode since Cloak doesn't do both TCP and UDP at the same time. Actually, I think this might be easier to implement than I thought, I'll take a crack at it.

<!-- gh-comment-id:749772546 --> @notsure2 commented on GitHub (Dec 22, 2020): I think it's fine to reuse the StreamTimeout meaning for UDP mode since Cloak doesn't do both TCP and UDP at the same time. Actually, I think this might be easier to implement than I thought, I'll take a crack at it.
Author
Owner

@cbeuw commented on GitHub (Dec 22, 2020):

Thanks! BTW this affects not only Singleplex. With Multiplex it doesn't ever close any stream either. The solution should be the same and singleplex shouldn't need special treatment

<!-- gh-comment-id:749774683 --> @cbeuw commented on GitHub (Dec 22, 2020): Thanks! BTW this affects not only Singleplex. With Multiplex it doesn't ever close any stream either. The solution should be the same and singleplex shouldn't need special treatment
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#118
No description provided.