Skip to content

Commit 63c87ca

Browse files
committed
fix proxy not working
1 parent 4951432 commit 63c87ca

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/pam/handlers/ssh/proxy.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,11 @@ func (p *SSHProxy) handleChannel(ctx context.Context, newChannel ssh.NewChannel,
266266
log.Info().Str("sessionID", sessionID).Msg("Channel cancelled by context")
267267
}
268268

269-
// Let exit-status be forwarded before closing channels.
270-
<-serverReqDone
269+
// Brief window for exit-status to be forwarded before channel teardown.
270+
select {
271+
case <-serverReqDone:
272+
case <-time.After(500 * time.Millisecond):
273+
}
271274
clientChannel.Close()
272275
serverChannel.Close()
273276
<-clientReqDone

0 commit comments

Comments
 (0)