-
Notifications
You must be signed in to change notification settings - Fork 24
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 warnings caused by API deprecations #234
base: master
Are you sure you want to change the base?
Conversation
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 looks good, just a few comments
@@ -93,7 +93,7 @@ internal class HTTPRequestHandler: ChannelInboundHandler, RemovableChannelHandle | |||
} catch { | |||
Log.error("Failed to send error response") | |||
} | |||
context.close() | |||
_ = context.close() |
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.
if you use context.close(promise: nil)
, then that's more efficient and doesn't return anything so you don't need the _ =
@@ -347,7 +347,7 @@ public class HTTPServer: Server { | |||
} | |||
|
|||
let bootstrap = ServerBootstrap(group: eventLoopGroup) | |||
.serverChannelOption(ChannelOptions.backlog, value: BacklogOption.Value(self.maxPendingConnections)) | |||
.serverChannelOption(ChannelOptions.backlog, value: ChannelOptions.Types.BacklogOption.Value(self.maxPendingConnections)) |
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.
use ChannelOptions.backlog
, that works in all NIO versions. The Types
are more or less internal
@@ -93,7 +93,7 @@ internal class HTTPRequestHandler: ChannelInboundHandler, RemovableChannelHandle | |||
} catch { |
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.
you also need to bump the minimum NIO version in Package.swift
to from: "2.12.0"
because you're using new stuff from 2.12
Thanks for reviewing @weissi ! I've addressed your comments. |
Pushkar Kulkarni seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
No description provided.