Skip to content

Commit be266a9

Browse files
authored
Downgrade NIOHTTP1TestServer handleChannel failure (#3137)
### Motivation: We added a fatalError to report NIOHTTP1TestServer handleChannel failures when doing the strict concurrency work which are now being hit. We don't know if these failures are actually new or not because the previous code just swallowed such errors. ### Modifications: Print the errors but limp-on to see if the test goes on to pass, if so this might not be a new error. ### Result: Less severe response to NIOHTTP1TestServer handleChannel failure.
1 parent 2de7065 commit be266a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/NIOTestUtils/NIOHTTP1TestServer.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ public final class NIOHTTP1TestServer {
272272
try channel.pipeline.syncOperations.addHandler(TransformerHandler())
273273
_ = try channel.syncOptions!.setOption(.autoRead, value: true)
274274
} catch {
275-
fatalError("Channel initialization failed with: \(error)")
275+
print("Channel initialization failed with: \(error)")
276+
channel.close(promise: nil)
276277
}
277278
}
278279

0 commit comments

Comments
 (0)