fix server ping coming as client payload
authorAndy Green <andy@warmcat.com>
Tue, 24 May 2011 08:34:50 +0000 (09:34 +0100)
committerAndy Green <andy@warmcat.com>
Tue, 24 May 2011 08:34:50 +0000 (09:34 +0100)
Client does auto-service server's ping, but then it
fell through and issued it as payload.  This fixes that
so there is no payload issued.

Reported-by: Chee Wooi Saw <cheewooi@gtwholdings.com>
Signed-off-by: Andy Green <andy@warmcat.com>
lib/parsers.c

index f67af4f..b4dc442 100644 (file)
@@ -1183,6 +1183,7 @@ spill:
                        n = libwebsocket_write(wsi, (unsigned char *)
                            &wsi->rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING],
                                    wsi->rx_user_buffer_head, LWS_WRITE_PONG);
+                       handled = 1;
                        break;
 
                case LWS_WS_OPCODE_07__PONG: