liris/websocket-client — Issue #6: "Invalid frame type"
Author: robertjd
Created: 2011-10-28 18:32:57+00:00
State: open

We are using websocket.py to communicate with Socket.IO on a server. Socket.IO sends heartbeat messages and we see those OK, here is some log output of what that looks like. The first line is from the logger in websocket.py and the second line comes from our logger in our on_message() handler:

```
2011-10-27 15:26:55,862 recv frame: '\x00'
2011-10-27 15:26:55,864 ('Websocket message: ', '2::')
```

However we occasionally see a problem where websocket.py interprets the first character of the message as a separate frame:

```
2011-10-27 15:27:12,065 recv frame: '\x00'
2011-10-27 15:27:12,065 recv frame: '2'
2011-10-27 15:27:12,066 ('Websocket message: ', '::')
2011-10-27 15:27:12,068 ('Websocket error: ', (WebSocketException('Invalid frame type',),))
```

I'm not certain if this is a problem in websocket.py or a problem with the data that is being sent to us from the server