From 035496d1984946ca596ff2ba1cb3961e7d6bb5ae Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 13 May 2019 17:11:39 +0200 Subject: [PATCH] Fixed info_* websocket not terminating on socket close --- src/output/output_http_internal.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index ebd01cc2..d52fac7d 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -786,6 +786,7 @@ namespace Mist { if (H.GetHeader("Upgrade") != "websocket"){return false;} HTTP::Websocket ws(myConn, H); if (!ws){return false;} + setBlocking(false); //start the stream, if needed Util::startInput(streamName, "", true, false); @@ -814,7 +815,11 @@ namespace Mist { if (newState == STRMSTAT_READY){ stats(); } - Util::sleep(250); + if (myConn.spool() && ws.readFrame()){ + onWebsocketFrame(); + }else{ + Util::sleep(250); + } if (newState == STRMSTAT_READY && (++metaCounter % 4) == 0){ updateMeta(); }