more logs

This commit is contained in:
ACoolName 2024-05-27 21:26:48 +03:00
parent 214013d445
commit 20ede52053

View File

@ -547,7 +547,6 @@ func (con Connection) AttachServer(ctx *gin.Context) {
time.Sleep(500) time.Sleep(500)
hijacked, err = con.dockerClient.ContainerAttach(context.TODO(), containers[0].ID, container.AttachOptions{Stream: true, Stdin: true, Stdout: true, Stderr: true, Logs: false}) hijacked, err = con.dockerClient.ContainerAttach(context.TODO(), containers[0].ID, container.AttachOptions{Stream: true, Stdin: true, Stdout: true, Stderr: true, Logs: false})
if err != nil { if err != nil {
log.Printf("Failed to re-attach container %s", err)
stop = true stop = true
break break
} }
@ -568,6 +567,7 @@ func (con Connection) AttachServer(ctx *gin.Context) {
err := ws.ReadJSON(&command) err := ws.ReadJSON(&command)
if err != nil { if err != nil {
fmt.Printf("Failed to read from websocket: %s", err)
command.CommandType = "close" command.CommandType = "close"
websocketRead <- command websocketRead <- command
break break