File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type Server struct {
3232 LocalPortForwardingCallback LocalPortForwardingCallback // callback for allowing local port forwarding, denies all if nil
3333 ReversePortForwardingCallback ReversePortForwardingCallback // callback for allowing reverse port forwarding, denies all if nil
3434 DefaultServerConfigCallback DefaultServerConfigCallback // callback for configuring detailed SSH options
35- SessionRequestCallback SessionRequestCallback // callback for allowing or denying SSH sessions
35+ SessionRequestCallback SessionRequestCallback // callback for allowing or denying SSH sessions
3636
3737 IdleTimeout time.Duration // connection timeout when no activity, none if empty
3838 MaxTimeout time.Duration // absolute connection timeout, none if empty
@@ -267,8 +267,10 @@ func (srv *Server) handleConn(newConn net.Conn) {
267267func (srv * Server ) handleRequests (ctx Context , in <- chan * gossh.Request ) {
268268 for req := range in {
269269 handler , found := srv .requestHandlers [req .Type ]
270- if ! found && req .WantReply {
271- req .Reply (false , nil )
270+ if ! found {
271+ if req .WantReply {
272+ req .Reply (false , nil )
273+ }
272274 continue
273275 }
274276 /*reqCtx, cancel := context.WithCancel(ctx)
You can’t perform that action at this time.
0 commit comments