Skip to content

Commit 465d1bd

Browse files
committed
Clean up Request replies
1 parent c9e327e commit 465d1bd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,13 @@ func (srv *Server) handleRequests(ctx Context, in <-chan *gossh.Request) {
293293
handler = srv.RequestHandlers["default"]
294294
}
295295
if handler == nil {
296-
if req.WantReply {
297-
req.Reply(false, nil)
298-
}
296+
req.Reply(false, nil)
299297
continue
300298
}
301299
/*reqCtx, cancel := context.WithCancel(ctx)
302300
defer cancel() */
303301
ret, payload := handler.HandleSSHRequest(ctx, srv, req)
304-
if req.WantReply {
305-
req.Reply(ret, payload)
306-
}
302+
req.Reply(ret, payload)
307303
}
308304
}
309305

0 commit comments

Comments
 (0)