1014 indicates that a gateway or proxy received and invalid upstream response.
See hybi WebSocket Subprotocol Close Code: Bad Gateway