The channelInactive callback is triggered when a WebSocket closes without sending a close code. Previously, the WebSocket.onClose future was still fulfilled but WebSocket.isClosed would be false and WebSocket.closeCode would be nil. This would later cause an assertion when WebSocket deinitialized. Now the onClose future is still fulfilled, but while also setting isClosed and closeCode (#60, fixes https://github.com/vapor/vapor/issues/2107).
The
channelInactive
callback is triggered when a WebSocket closes without sending a close code. Previously, theWebSocket.onClose
future was still fulfilled butWebSocket.isClosed
would be false andWebSocket.closeCode
would be nil. This would later cause an assertion whenWebSocket
deinitialized. Now theonClose
future is still fulfilled, but while also settingisClosed
andcloseCode
(#60, fixes https://github.com/vapor/vapor/issues/2107).