Fix incomplete debug message

that is created by sending SIGQUIT to the bash process
by not processing output after the the client disconnected / we have sent the SIGQUIT.
This commit is contained in:
Maximilian Paß
2023-08-01 12:25:10 +02:00
committed by Sebastian Serth
parent 0fd6e42487
commit 90092c48c1
3 changed files with 50 additions and 30 deletions

View File

@@ -65,6 +65,7 @@ func (wp *webSocketProxy) waitForExit(exit <-chan runner.ExitInfo, cancelExecuti
case <-wp.ctx.Done():
log.WithContext(wp.ctx).Info("Client closed the connection")
wp.Input.Stop()
wp.Output.Close(nil)
cancelExecution()
<-exit // /internal/runner/runner.go handleExitOrContextDone does not require client connection anymore.
<-exit // The goroutine closes this channel indicating that it does not use the connection to the executor anymore.