Skip to content

Modify keepAliveLoop to async for enabling timeout on no-response ping#488

Closed
naisy wants to merge 1 commit into
jpillora:masterfrom
naisy:ping_timeout
Closed

Modify keepAliveLoop to async for enabling timeout on no-response ping#488
naisy wants to merge 1 commit into
jpillora:masterfrom
naisy:ping_timeout

Conversation

@naisy

@naisy naisy commented Jan 12, 2024

Copy link
Copy Markdown

Usage Environment:

  • The chisel server operates with a fixed IP address.
  • The chisel client frequently changes its IP address when using mobile phone networks.
  • The chisel client uses both tunneling and reverse tunneling.

Problem:

  • In the keepAliveLoop, the ping transmission part does not have a timeout. Consequently, if there is no response, the process halts. This leads to the SSH port not being released.
  • Although new clients with new IP addresses can send data to the server, reverse tunneling is limited to communication between one server port and one client. Therefore, when the client's IP changes, the server cannot send data to the new client. This issue persists until the chisel server is restarted.

Solution:

  • Modify the ping process to be asynchronous. If there is no response within the specified keepalive time, the established SSH connection will be closed.

VHSgunzo added a commit to VHSgunzo/chisel that referenced this pull request Jun 23, 2024
@jpillora

Copy link
Copy Markdown
Owner

Thanks for working on this! A fix for the blocking keepalive ping has been implemented based on the approach in #581 (ping raced against a timeout, with a CHISEL_PING_TIMEOUT override) and will ship in the next release. Closing as superseded.

@jpillora jpillora closed this Jun 12, 2026
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

Successfully merging this pull request may close these issues.

2 participants