agrinman / tunnelto

Expose your local web server to the internet with a public URL.
https://tunnelto.dev
MIT License
2.11k stars 114 forks source link

client is unaware that it needs to reconnect after OS suspend #58

Open PAStheLoD opened 2 years ago

PAStheLoD commented 2 years ago

I left my PC (WSL2 on Win11) in suspend for overnight and the client continues running, but the tunnel is not found when I tried it in the morning.

This has happened a few times already, but now I've started the client with --verbose, and when it happens next time I'll try to get more details. (strace? gdb?)

PAStheLoD commented 2 years ago

After some suspend here's a strace output.

$ strace -f -p 5499
strace: Process 5499 attached with 17 threads
[pid  5515] futex(0x7f26ee9f4360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5514] sched_yield( <unfinished ...>
[pid  5513] futex(0x7f26eedf6360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5512] futex(0x7f26eeff7360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5511] futex(0x7f26ef1f8360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5510] futex(0x7f26ef3f9360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5509] futex(0x7f26ef5fa360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5508] futex(0x7f26ef7fb360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5507] futex(0x7f26ef9fc360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5506] futex(0x7f26efbfd360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5505] futex(0x7f26efdfe360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5504] futex(0x7f26effff360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5503] futex(0x7f26fc397360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5501] futex(0x7f26fc79c360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5500] futex(0x7f26fc99d360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5514] <... sched_yield resumed>)  = 0
[pid  5502] futex(0x7f26fc59b360, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5499] futex(0x7f26fc99e760, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5514] sched_yield()               = 0
[pid  5514] sched_yield()               = 0
[pid  5514] epoll_wait(3,