Skip to content

Commit 2431511

Browse files
committed
Remove select statement with single case
1 parent 6742515 commit 2431511

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ssh_session.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ func createSSHSessionHandler(shell string) ssh.Handler {
8181
log.Println("No PTY requested, no command supplied")
8282

8383
// Keep this open until the session exits, could e.g. be port forwarding
84-
select {
85-
case <-s.Context().Done():
86-
log.Printf("Session terminated: %s", s.Context().Err())
87-
}
84+
<-s.Context().Done()
85+
log.Printf("Session terminated: %s", s.Context().Err())
86+
return
8887
}
8988
}
9089
}

0 commit comments

Comments
 (0)