Skip to content

Commit

Permalink
Flush embedded channel. (#15)
Browse files Browse the repository at this point in the history
Motivation:

apple/swift-nio#421 changed the behaviour of EmbeddedChannel to no longer
automatically succeed write promises without flushes. This is a reasonable
behavioural change, but broke a test that was working around but still
implicitly relied on the old behaviour.

Modifications:

Add the missing flushes.

Result:

This test will pass both on NIO master and NIO 1.7.0
  • Loading branch information
Lukasa authored and weissi committed May 22, 2018
1 parent 8e0aa76 commit 0adc938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private class WriteDelayHandler: ChannelOutboundHandler {
func forceFlush() {
let writes = self.writes
self.writes = []
writes.forEach { $0.0.write($0.1, promise: $0.2) }
writes.forEach { $0.0.writeAndFlush($0.1, promise: $0.2) }
}
}

Expand Down

0 comments on commit 0adc938

Please sign in to comment.