-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow non-consecutive duplicate byte event registrations
Summary: As per design, we are not supposed to honor duplicate byte event registrations. Duplicate is defined by a registration for the same <stream ID, stream offset, callback*> tuple twice. Currently, there is a bug where-in we can register the same byte event a second time *if* there is another byte event for a higher offset that is registered in-between, for the same stream. Example Sequence that triggers the bug: 1. Registration for Stream ID =10, offset = 50, callback = A. This will be successful. 2. Registration for Stream ID = 10, offset = 55, callback = <doesn't matter>. This will be successful. 3. Registration for Stream ID = 10, offset = 50, callback = A. This is a duplicate of #1. This *should not* be honored, but it was being honored (this was the bug). This commit fixes the bug, #3 will return INVALID_OPERATION. Reviewed By: bschlinker, lnicco Differential Revision: D27946237 fbshipit-source-id: f9751ac90159284f86a285e5e0ebb23b83041d2a
- Loading branch information
1 parent
4486430
commit 967b240
Showing
2 changed files
with
79 additions
and
2 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