websocket-kit
websocket-kit copied to clipboard
Client should send ping
Amazon's Application Load Balancers are configured to shut down connections that haven't had traffic.
Sending a ping on the connection every so often is enough to keep the connection alive. I plan to implement this functionality on the WebSocket class and will submit a PR.
@bridger thanks. We automatically return a pong already for the server case but it looks like the client case needs to be sending ping at some interval. eventLoop.scheduledTask will probably work well for this.
@tanner0101 The scheduleTask API is what I used to address this issue in https://github.com/vapor/websocket-kit/pull/68
Sent with GitHawk