The checkReadBuffer function of MPMessagePackClient willl stop parsing a big message with an error on this line of code:
|
[self handleError:error fatal:YES]; |
This function tries to parse _readBuffer, which is filled from the stream by portions using a smaller buffer here:
This happens in 2 cases:
- either the complete message is bigger than the smaller buffer size (4096 bytes)
- or the network is slow to load just a part of the message in one
read call (let's say your message is 2K, but the network provides only the first 1K in the beginning)
I'd prefer that this RPC client was tolerant to the errors that happen due to the buffer index outrun, and just retried readInputStream in this case.
The
checkReadBufferfunction ofMPMessagePackClientwilll stop parsing a big message with an error on this line of code:MPMessagePack/RPC/MPMessagePackClient.m
Line 255 in 261f56a
This function tries to parse
_readBuffer, which is filled from the stream by portions using a smaller buffer here:MPMessagePack/RPC/MPMessagePackClient.m
Line 215 in 261f56a
This happens in 2 cases:
readcall (let's say your message is 2K, but the network provides only the first 1K in the beginning)I'd prefer that this RPC client was tolerant to the errors that happen due to the buffer index outrun, and just retried readInputStream in this case.