Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectTCPIPHandler: block until copying is done or fails #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stapelberg
Copy link

This way, users can wrap DirectTCPIPHandler with behavior, e.g. waking up a
powered-down machine before proxying packets to it, and sending that machine
back to sleep once no more connections are open.

AFAICT, this is not a change in behavior since handlers are already run in their
own goroutine, so blocking in DirectTCPIPHandler should not block anything:

ssh/server.go

Line 287 in 59d6e45

go handler(srv, sshConn, ch, ctx)

This way, users can wrap DirectTCPIPHandler with behavior, e.g. waking up a
powered-down machine before proxying packets to it, and sending that machine
back to sleep once no more connections are open.

AFAICT, this is not a change in behavior since handlers are already run in their
own goroutine, so blocking in DirectTCPIPHandler should not block anything:
https://github.com/gliderlabs/ssh/blob/59d6e4540dea33ecd8f90b12887906b7b081fbcd/server.go#L287
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.

1 participant