Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24875
Closed (moved) (moved)
Open
Created Jan 11, 2018 by David Fifield@dcf

meek-client doesn't exit on close of stdin if there are no active handlers running

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
		}
	}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking