Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don’t throw when reading multiple frames

  • Loading branch information...
commit fd9a80b60508781a4eb33dc6f2acb37c605f138f 1 parent 8b27b4c
Max Howell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  MBWebSocketServer.m
2  MBWebSocketServer.m
View
@@ -263,7 +263,7 @@ + (NSData *)dataWithWebSocketFrameData:(NSData *)webSocketData {
NSMutableData *data = [NSMutableData data];
uint x = 0;
while (x < webSocketData.length) {
- x += readFrame(webSocketData.bytes + x, webSocketData.length, ^(char *rawdata, NSUInteger length){
+ x += readFrame(webSocketData.bytes + x, webSocketData.length - x, ^(char *rawdata, NSUInteger length){
[data appendBytes:rawdata length:length];
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.