[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #24875 [Obfuscation/meek]: meek-client doesn't exit on close of stdin if there are no active handlers running
#24875: meek-client doesn't exit on close of stdin if there are no active handlers
running
----------------------------------+-----------------
Reporter: dcf | Owner: dcf
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Obfuscation/meek | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
----------------------------------+-----------------
If you give meek-client an EOF while it's not currently handling any
connections, it says it is terminating but doesn't quite terminate.
{{{
$ TOR_PT_EXIT_ON_STDIN_CLOSE=1 TOR_PT_MANAGED_TRANSPORT_VER=1
TOR_PT_CLIENT_TRANSPORTS=meek ./meek-client < /dev/null
VERSION 1
CMETHOD meek socks5 127.0.0.1:35831
2018/01/11 22:03:23 listening on 127.0.0.1:35831
CMETHODS DONE
2018/01/11 22:03:23 synthesizing SIGTERM because of stdin close
2018/01/11 22:03:23 got signal terminated
2018/01/11 22:03:23 error in AcceptSocks: accept tcp 127.0.0.1:35831: use
of closed network connection
}}}
It's stuck in this loop, because it only checks `numHandlers == 0` inside
the loop and not before entering.
{{{
for n := range handlerChan {
numHandlers += n
if numHandlers == 0 {
break
}
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24875>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs