diff --git a/Sources/NIO/Channel.swift b/Sources/NIO/Channel.swift index d779f64f7..be2666e39 100644 --- a/Sources/NIO/Channel.swift +++ b/Sources/NIO/Channel.swift @@ -1336,7 +1336,7 @@ class BaseSocketChannel : SelectableChannel, ChannelCore { return } if interested == interestedEvent || interestedEvent == .none { - // we not need to update and so cause a syscall if we already are registered with the correct event + // we don't need to update and so cause a syscall if we already are registered with the correct event return } interestedEvent = interested diff --git a/Sources/NIO/ChannelPipeline.swift b/Sources/NIO/ChannelPipeline.swift index 3eb49a101..2d820c172 100644 --- a/Sources/NIO/ChannelPipeline.swift +++ b/Sources/NIO/ChannelPipeline.swift @@ -399,7 +399,7 @@ public final class ChannelPipeline : ChannelInvoker { remove0(ctx: ctx, promise: eventLoop.newPromise()) } - // We need to set the next reference to nil to ensure we not leak memory due a cycle-reference. + // We need to set the next reference to nil to ensure we don't leak memory due a cycle-reference. destroyReferences(inboundChain!) destroyReferences(outboundChain!) @@ -407,7 +407,7 @@ public final class ChannelPipeline : ChannelInvoker { } private func destroyReferences(_ ctx: ChannelHandlerContext) { - // We need to set the next reference to nil to ensure we not leak memory due a cycle-reference. + // We need to set the next reference to nil to ensure we don't leak memory due a cycle-reference. ctx.inboundNext = nil ctx.outboundNext = nil ctx.pipeline = nil diff --git a/Sources/NIOEchoServer/main.swift b/Sources/NIOEchoServer/main.swift index 88aa023e9..d2d10c527 100644 --- a/Sources/NIOEchoServer/main.swift +++ b/Sources/NIOEchoServer/main.swift @@ -106,7 +106,7 @@ let channel = try { () -> Channel in print("Server started and listening on \(channel.localAddress!)") -// This will never unblock as we not close the ServerChannel +// This will never unblock as we don't close the ServerChannel try channel.closeFuture.wait() print("Server closed") diff --git a/Sources/NIOHTTP1/HTTPDecoder.swift b/Sources/NIOHTTP1/HTTPDecoder.swift index 7a72d4d6f..fa084be87 100644 --- a/Sources/NIOHTTP1/HTTPDecoder.swift +++ b/Sources/NIOHTTP1/HTTPDecoder.swift @@ -402,7 +402,7 @@ public class HTTPDecoder: ByteToMessageDecoder, AnyHTTPDecoder { public func decode(ctx: ChannelHandlerContext, buffer: inout ByteBuffer) throws -> Bool { if let slice = state.slice { - // If we stored a slice before we need to ensure we move the readerIndex so we not try to parse the data again and also + // If we stored a slice before we need to ensure we move the readerIndex so we don't try to parse the data again and also // adjust the slice as it now starts from 0. state.slice = (readerIndex: 0 , length: slice.length) buffer.moveReaderIndex(forwardBy: state.readerIndexAdjustment) diff --git a/Sources/NIOHTTP1Server/main.swift b/Sources/NIOHTTP1Server/main.swift index 646fb098e..4555a45ad 100644 --- a/Sources/NIOHTTP1Server/main.swift +++ b/Sources/NIOHTTP1Server/main.swift @@ -358,7 +358,7 @@ let channel = try { () -> Channel in print("Server started and listening on \(channel.localAddress!), htdocs path \(htdocs)") -// This will never unblock as we not close the ServerChannel +// This will never unblock as we don't close the ServerChannel try channel.closeFuture.wait() print("Server closed") diff --git a/Sources/NIOTLSServer/main.swift b/Sources/NIOTLSServer/main.swift index ad01852ab..41f23eb0a 100644 --- a/Sources/NIOTLSServer/main.swift +++ b/Sources/NIOTLSServer/main.swift @@ -77,7 +77,7 @@ let channel = try bootstrap.bind(to: host, on: port).wait() print("Server started and listening on \(channel.localAddress!)") -// This will never unblock as we not close the ServerChannel +// This will never unblock as we don't close the ServerChannel try channel.closeFuture.wait() print("Server closed")