Clean up Request replies

This commit is contained in:
Kaleb Elwert 2019-06-12 10:42:05 -07:00
parent c9e327ebeb
commit 465d1bd2c7

@ -293,19 +293,15 @@ func (srv *Server) handleRequests(ctx Context, in <-chan *gossh.Request) {
handler = srv.RequestHandlers["default"]
}
if handler == nil {
if req.WantReply {
req.Reply(false, nil)
}
continue
}
/*reqCtx, cancel := context.WithCancel(ctx)
defer cancel() */
ret, payload := handler.HandleSSHRequest(ctx, srv, req)
if req.WantReply {
req.Reply(ret, payload)
}
}
}
// ListenAndServe listens on the TCP network address srv.Addr and then calls
// Serve to handle incoming connections. If srv.Addr is blank, ":22" is used.