mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
some grammar fixes
This commit is contained in:
1 parent
4f2c5234df
commit
eaf658691c
6 files changed
+7
-7
No files matched your search
@@ -1336,7 +1336,7 @@ class BaseSocketChannel<T : BaseSocket> : 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
@@ -402,7 +402,7 @@ public class HTTPDecoder<HTTPMessageT>: 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)
|
||||
|
||||
@@ -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")
|
||||
@@ -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")
|
||||
Reference in new issue
Block a user