-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update http2, wai. #3911
Update http2, wai. #3911
Conversation
44fb140
to
e516c0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very fond of the string-conversions
change 👀
265e853
to
a8e8d08
Compare
95dde02
to
789c2a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
allocServerConfig :: (Socket, Maybe SSL.SSL) -> IO Server.Config | ||
allocServerConfig (sock, Nothing) = | ||
HTTP2.allocSimpleConfig sock 4096 | ||
allocServerConfig (sock, Just ssl) = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: perhaps this would be nicer curried.
| chunkLen > n -> | ||
error "openssl: SSL.read returned more bytes than asked for, this is probably a bug" | ||
| otherwise -> | ||
readData (prevChunk <> chunk) (n - chunkLen) | ||
|
||
testServerOnSocket :: Maybe SSL.SSLContext -> Socket -> IORef Int -> IORef (Map Unique (Async ())) -> IO () | ||
testServerOnSocket mCtx listenSock connsCounter conns = do | ||
listen listenSock 1024 | ||
forever $ do | ||
(sock, _) <- accept listenSock | ||
serverCfgParam <- case mCtx of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that case you could just match here directly and then only pass the snd
to the case
c28ca13
to
872ccb7
Compare
ee9965a
to
b92cdb0
Compare
4ec8059
to
3b076e4
Compare
may also fix https://wearezeta.atlassian.net/browse/WPB-5357
This cleans up the
ConnectionIsClosed
noise.