1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-09 07:45:22 +02:00

sleep before close to allow user to see the error msg

This commit is contained in:
hookenz 2024-01-30 07:52:38 +13:00 committed by Dakota Walsh
parent cd5f342da0
commit c9d91008f8
No known key found for this signature in database

View file

@ -102,7 +102,10 @@ func (handler *Handler) handleExecRequest(w http.ResponseWriter, r *http.Request
if err != nil { if err != nil {
return err return err
} }
defer websocketConn.Close() defer func() {
time.Sleep(10 * time.Second)
websocketConn.Close()
}()
return hijackExecStartOperation(websocketConn, params.endpoint, params.ID, tokenData.Token) return hijackExecStartOperation(websocketConn, params.endpoint, params.ID, tokenData.Token)
} }