Clean fix lwt io flow#329
Merged
Merged
Conversation
…handshake (not useful and error-prone)
3 tasks
1ea344f to
82692fc
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
So, I don't really know why we decided to use
Lwt_iobut it seems a bad choice which was may be lead by the ability to create such value withLwt_ssl.out_channel_of_descr/Lwt_ssl.in_channel_of_descron the other side. This is not the first issue aboutLwt_io(double-close for example) butcohttptrust on that and we must tweak implementation of protocols to be able to re-schedule fibers when the socket is not readable.I hope that this is the last fix to fit into
Lwt_iobut we definitely should think to remove the usage of it - specially when a protocol such as HTTP/1.1 requires a full control of when we want to read and when we want to write (eg.http/af).This PR is mostly a clean-up about the mix between
Lwt_io/Conduit_lwt.TCP/Conduit_lwt_tls.TCPwhich keeps tests right and should fix issues oncohttpthen. This error is more, from my point-of-view, about a technical debt which is outside the scope ofmiragewhen we chosen to useLwt_io.I added a comment which tells to the user to not use
Conduit_lwt.io_of_flowtoo.