-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the frame reader, we were storing the frame size including the header (frame size + flags which is 6 bytes). Also, after reading the frame size from the header, we were incrementing the bytes_read. That approach works for small frames, that we can read with one go, but was not working for frames that are large. For the same frame, the next time we call read_frame, the length of the reader (the data we haven't read from the buffer) was equal to frame size, but the variable frame_size was equal to `frame_size + HEADER_SIZE`. So, we were not reading the data that was actually there due to some faulty length check. We were able to read the data that is in the buffer after some long time, when the response for the client ping request comes as it was incrementing the length of the reader enough to pass the length check. To fix that, now, the frame_size field holds the frame size excluding the header size.
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters