Fix incorrect sending of HTTP error response through Websocket connections.

This commit is contained in:
Thulinma 2018-09-06 13:36:54 +02:00
parent 373b9afd32
commit 6226a05fe3

View file

@ -43,9 +43,11 @@ namespace Mist {
}
void HTTPOutput::onFail(){
H.Clean(); //make sure no parts of old requests are left in any buffers
H.SetBody("Stream not found. Sorry, we tried.");
H.SendResponse("404", "Stream not found", myConn);
if (!webSock){
H.Clean(); //make sure no parts of old requests are left in any buffers
H.SetBody("Stream not found. Sorry, we tried.");
H.SendResponse("404", "Stream not found", myConn);
}
Output::onFail();
}