File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -336,12 +336,6 @@ open class Process: NSObject {
336
336
return ( first: INVALID_SOCKET, second: INVALID_SOCKET)
337
337
}
338
338
339
- var value : u_long = 1
340
- if ioctlsocket ( first, FIONBIO, & value) == SOCKET_ERROR {
341
- closesocket ( first)
342
- return ( first: INVALID_SOCKET, second: INVALID_SOCKET)
343
- }
344
-
345
339
withUnsafePointer ( to: & address) {
346
340
$0. withMemoryRebound ( to: sockaddr. self, capacity: 1 ) {
347
341
result = connect ( first, $0, Int32 ( MemoryLayout< sockaddr_in> . size) )
@@ -353,6 +347,12 @@ open class Process: NSObject {
353
347
return ( first: INVALID_SOCKET, second: INVALID_SOCKET)
354
348
}
355
349
350
+ var value : u_long = 1
351
+ if ioctlsocket ( first, FIONBIO, & value) == SOCKET_ERROR {
352
+ closesocket ( first)
353
+ return ( first: INVALID_SOCKET, second: INVALID_SOCKET)
354
+ }
355
+
356
356
let second : SOCKET = accept ( listener, nil , nil )
357
357
if second == INVALID_SOCKET {
358
358
closesocket ( first)
You can’t perform that action at this time.
0 commit comments