From ddb97bfafb4997d28200cb76fb253e54bb62ab22 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 8 Sep 2016 21:00:23 -0700 Subject: [PATCH] Fix SendStream error handling. --- src/HTTPSinkImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HTTPSinkImpl.cpp b/src/HTTPSinkImpl.cpp index 3f0ee2e2c7..d9679ddeb1 100644 --- a/src/HTTPSinkImpl.cpp +++ b/src/HTTPSinkImpl.cpp @@ -295,12 +295,14 @@ void HTTPSinkImpl::SendStream(wpi::raw_socket_ostream& os) { if (!source) { // Source disconnected; sleep for one second std::this_thread::sleep_for(std::chrono::seconds(1)); + continue; } Frame frame = source->GetNextFrame(); // blocks if (!m_active) break; if (!frame) { // Bad frame; sleep for 10 ms so we don't consume all processor time. std::this_thread::sleep_for(std::chrono::milliseconds(10)); + continue; } // print the individual mimetype and the length