mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 01:34:01 +00:00
Remove checking for error from session end in web terminal (#8797)
Removes the call for wait for ssh.Session end to check for errors in web terminal which fixes a regression bug where typing "exit" in web terminal does not return session end event. PR #8081 removed the need to check for errors as it correctly returns exit errors whereas before it returned nil.
This commit is contained in:
parent
878539bf49
commit
092e3ab72e
|
@ -494,16 +494,6 @@ func (t *TerminalHandler) streamTerminal(ws *websocket.Conn, tc *client.Teleport
|
|||
return
|
||||
}
|
||||
|
||||
// Check if remote process exited with error code, eg: RemoteCommandFailure (255).
|
||||
if t.sshSession != nil {
|
||||
if err := t.sshSession.Wait(); err != nil {
|
||||
if exitErr, ok := err.(*ssh.ExitError); ok {
|
||||
t.log.Warnf("Remote shell exited with error code: %v", exitErr.ExitStatus())
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Send close envelope to web terminal upon exit without an error.
|
||||
envelope := &Envelope{
|
||||
Version: defaults.WebsocketVersion,
|
||||
|
|
Loading…
Reference in a new issue