Skip to content

Commit

Permalink
Merge pull request #2364 from BenjaminSchaaf/patch-2
Browse files Browse the repository at this point in the history
Make sure connection is closed after websocket reader exits
  • Loading branch information
s-ludwig authored Dec 5, 2019
2 parents a9487b9 + 9b56a99 commit 2645c7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion http/vibe/http/websockets.d
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,10 @@ final class WebSocket {
private void startReader()
{
m_readMutex.performLocked!({}); //Wait until initialization
scope (exit) m_readCondition.notifyAll();
scope (exit) {
m_conn.close();
m_readCondition.notifyAll();
}
try {
while (!m_conn.empty) {
assert(!m_nextMessage);
Expand Down

0 comments on commit 2645c7b

Please sign in to comment.