This repository was archived by the owner on May 24, 2022. It is now read-only.
Properly handle data queued in the SSL layer#149
Open
mendsley wants to merge 1 commit intobumptech:masterfrom
Open
Properly handle data queued in the SSL layer#149mendsley wants to merge 1 commit intobumptech:masterfrom
mendsley wants to merge 1 commit intobumptech:masterfrom
Conversation
If, after an SSL_read operation, there is still data pending in the SSL layer (such as the remainder of a TLS record), we need to simulate an EV_READ event on the watcher. OpenSSL won't attempt to read the data from the underlying socket until this data is consumed. Since there is no new activity on the socket, libev will not trigger a new EV_READ notification. This just happened to work with the large () buffers passed to SSL_read from the ringbuffer. However, when adjusting these buffers, it becomes increasingly likely to deadlock a socket by leaving this pending data in the OpenSSL buffers.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If, after an SSL_read operation, there is still data pending in
the SSL layer (such as the remainder of a TLS record), we need
to simulate an EV_READ event on the watcher. OpenSSL won't attempt
to read the data from the underlying socket until this data is
consumed. Since there is no new activity on the socket, libev will
not trigger a new EV_READ notification.
This just happened to work with the large () buffers passed to
SSL_read from the ringbuffer. However, when adjusting these buffers,
it becomes increasingly likely to deadlock a socket by leaving
this pending data in the OpenSSL buffers.