Skip to content

Commit

Permalink
Fix Swift 4 compile error due to SE-0176 Enforce Exclusive Access to …
Browse files Browse the repository at this point in the history
…Memory.
  • Loading branch information
foogywoo committed May 18, 2019
1 parent 36d247d commit 68bea6c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
Binary file modified .DS_Store
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
4 changes: 2 additions & 2 deletions Sources/MMSocketServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public class MMSocketServer {
ptr in _ = ptr.withMemoryRebound(to: sockaddr.self, capacity: 1) { ptrSockAddr in
getsockname(sock_fd, UnsafeMutablePointer(ptrSockAddr), &server_addr_size)
}

self.port = UInt16(bigEndian:server_addr.sin_port)
}

self.port = UInt16(bigEndian:server_addr.sin_port)

if listen(self.sock_fd, 1) == -1 {
self.stop()
throw MMSocketError(MMSocketError.Code.FailToListen)
Expand Down

0 comments on commit 68bea6c

Please sign in to comment.