Add channelInactive callback to mark WebSocket as closed.
Pre-release
Pre-release
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 vapor/vapor#2107).