File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type Server struct {
32
32
LocalPortForwardingCallback LocalPortForwardingCallback // callback for allowing local port forwarding, denies all if nil
33
33
ReversePortForwardingCallback ReversePortForwardingCallback // callback for allowing reverse port forwarding, denies all if nil
34
34
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
36
36
37
37
IdleTimeout time.Duration // connection timeout when no activity, none if empty
38
38
MaxTimeout time.Duration // absolute connection timeout, none if empty
@@ -267,8 +267,10 @@ func (srv *Server) handleConn(newConn net.Conn) {
267
267
func (srv * Server ) handleRequests (ctx Context , in <- chan * gossh.Request ) {
268
268
for req := range in {
269
269
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
+ }
272
274
continue
273
275
}
274
276
/*reqCtx, cancel := context.WithCancel(ctx)
You can’t perform that action at this time.
0 commit comments