Merge pull request #1515 from theAirC/patch-1

Detection of closed websocket connection
This commit is contained in:
Günter Obiltschnig 2016-12-08 21:10:02 +01:00 committed by GitHub
commit 0746cc1a0f

View File

@ -119,7 +119,7 @@ public:
app.logger().information(Poco::format("Frame received (length=%d, flags=0x%x).", n, unsigned(flags))); app.logger().information(Poco::format("Frame received (length=%d, flags=0x%x).", n, unsigned(flags)));
ws.sendFrame(buffer, n, flags); ws.sendFrame(buffer, n, flags);
} }
while (n > 0 || (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE); while (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
app.logger().information("WebSocket connection closed."); app.logger().information("WebSocket connection closed.");
} }
catch (WebSocketException& exc) catch (WebSocketException& exc)