diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index af0f169d..ea7a74f6 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -860,6 +860,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); @@ -888,7 +889,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(); }