Update corner case for websockets (a 126 byte packet)

This commit is contained in:
Charles Lohr 2016-07-21 22:57:14 -04:00
parent 686f47217f
commit 7ddf3ff9cc

View file

@ -601,7 +601,7 @@ void ICACHE_FLASH_ATTR WebSocketSend( uint8_t * data, int size )
{ {
START_PACK; START_PACK;
PushByte( 0x81 ); PushByte( 0x81 );
if( size > 126 ) if( size >= 126 )
{ {
PushByte( 0x00 | 126 ); PushByte( 0x00 | 126 );
PushByte( size>>8 ); PushByte( size>>8 );