Skip to content

Fix warnings caused by API deprecations#234

Open
pushkarnk wants to merge 2 commits into
masterfrom
warnings
Open

Fix warnings caused by API deprecations#234
pushkarnk wants to merge 2 commits into
masterfrom
warnings

Conversation

@pushkarnk

Copy link
Copy Markdown
Contributor

No description provided.

@weissi weissi left a comment

Copy link
Copy Markdown

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

Log.error("Failed to send error response")
}
context.close()
_ = context.close()

Copy link
Copy Markdown

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 _ =

Comment thread Sources/KituraNet/HTTP/HTTPServer.swift Outdated

let bootstrap = ServerBootstrap(group: eventLoopGroup)
.serverChannelOption(ChannelOptions.backlog, value: BacklogOption.Value(self.maxPendingConnections))
.serverChannelOption(ChannelOptions.backlog, value: ChannelOptions.Types.BacklogOption.Value(self.maxPendingConnections))

Copy link
Copy Markdown

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 {

Copy link
Copy Markdown

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

@pushkarnk

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing @weissi ! I've addressed your comments.

@CLAassistant

CLAassistant commented Sep 27, 2020

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants