Skip to content

Commit

Permalink
Fixes build issue on 4.1 (#229)
Browse files Browse the repository at this point in the history
Motivation:

Resolves #228

Modifications:

Remove type information in empty closure fixed build warning with compiler suggestion

Result:

No API changes, no issues building on 4.1!
  • Loading branch information
0xTim authored and Lukasa committed Mar 23, 2018
1 parent 1bcf85d commit a0b7f64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/NIO/System.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private let sysFreeifaddrs: @convention(c) (UnsafeMutablePointer<ifaddrs>?) -> V
private let sysAF_INET = AF_INET
private let sysAF_INET6 = AF_INET6
private let sysAF_UNIX = AF_UNIX
private let sysInet_ntop: @convention(c) (CInt, UnsafeRawPointer?, UnsafeMutablePointer<CChar>?, socklen_t) -> UnsafePointer<CChar>! = inet_ntop
private let sysInet_ntop: @convention(c) (CInt, UnsafeRawPointer?, UnsafeMutablePointer<CChar>?, socklen_t) -> UnsafePointer<CChar>? = inet_ntop

#if os(Linux)
private let sysSendMmsg: @convention(c) (CInt, UnsafeMutablePointer<CNIOLinux_mmsghdr>?, CUnsignedInt, CInt) -> CInt = CNIOLinux_sendmmsg
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOWebSocketServer/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private final class WebSocketTimeHandler: ChannelInboundHandler {
buffer.write(string: "\(theTime)")

let frame = WebSocketFrame(fin: true, opcode: .text, data: buffer)
ctx.writeAndFlush(self.wrapOutboundOut(frame)).map { (_: Void) in
ctx.writeAndFlush(self.wrapOutboundOut(frame)).map {
_ = ctx.eventLoop.scheduleTask(in: .seconds(1), { self.sendTime(ctx: ctx) })
}.whenFailure { (_: Error) in
ctx.close(promise: nil)
Expand Down

0 comments on commit a0b7f64

Please sign in to comment.