sleep before close to allow user to see the error msg

pull/11033/head
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
1 changed files with 4 additions and 1 deletions

View File

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