-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix 784: dont crash on huge in-memory bodies #785
Conversation
// Also, we must frequently return to the EventLoop because we may get the pause signal | ||
// from another thread. If we fail to do that promptly, we may balloon our body chunks | ||
// into memory. | ||
allDone.futureResult.eventLoop.execute { |
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.
This is the crucial line (apart from the thread unsafety from UnsafeMutableTransferBox
)
@@ -1548,3 +1586,88 @@ private let key = """ | |||
oYQsPj00S3/GA9WDapwe81Wl2A== | |||
-----END PRIVATE KEY----- | |||
""" | |||
|
|||
final class BasicInboundTrafficShapingHandler: ChannelDuplexHandler { |
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.
This turned out to not be necessary, but it's a test-only utility which can't hurt I thought :).
adab7a2
to
692483b
Compare
0afe7d9
to
cd29ba9
Compare
fixes #784
writeChunks
had 3 bugs:UnsafeMutableTransferBox
-> removed that type which should never be created