Closed torpedro closed 5 years ago
Maybe it's better to use the self->frame->opcode and compare it to the kWebSocketFrameOpCodeClose instead of assuming a closed socket when the message is empty.
I forked the repo and (more or less) merged the changes you added with some additions.
This patch will trigger the "__WebSocketRemoveClient" method, when it is detected that the connection has been dropped and the stream is broken.