ping without hello causes broken socket
Closed this issue · 2 comments
- python wsdump.py ws://localhost:8080
{"messageType":"ping"}
actual:
WebSocketConnectionClosedException
server:
2013/06/17 13:30:50 [3] main: New socket connection detected
2013/06/17 13:30:54 [3] worker: Socket received raise WebSocketConnectionClosedException()
2013/06/17 13:30:54 [1] worker: Unparsable data
2013/06/17 13:30:54 [3] server: Server Handling command {%!s(int=6) }
2013/06/17 13:30:54 [3] server: Server cleanup...
2013/06/17 13:30:54 [3] server: Cleaning up socket
2013/06/17 13:30:54 [3] timer: Socket connection terminated
expected:
{"messageType": "hello", "uaid":"uaid", "channelIDs":["abc"]}
{"messageType":"ping"}
< {"messageType":"ping","status":200}
Unable to reproduce:
bin/python wsdump.py ws://localhos:8080
Press Ctrl+C to quit
{}
< {"messageType":"ping","status":200}
{"messageType":"ping"}
< {"messageType":"ping","status":200}
{"messageType":"hello"}
< {"error":"Missing required fields for command","messageType":"hello","status":401,"uaid":""}
{"messageType":"hello", "uaid":"hello", "channelIDs":[]}
< {"messageType":"hello","status":200,"uaid":"hello"}
{"messageType":"ping"}
< {"messageType":"ping","status":200}
{}
< {"messageType":"ping","status":200}
confirmed, I'm not able to repro this on the latest master