Explorar o código

Opening port fix

Pavel Yurchenko hai 11 meses
pai
achega
646184e5dd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Sources/SwiftSerial/SerialPort.swift

+ 1 - 1
Sources/SwiftSerial/SerialPort.swift

@@ -44,7 +44,7 @@ public class SerialPort {
 		#if os(Linux)
 		fileDescriptor = open(path, readWriteParam | O_NOCTTY)
 		#elseif os(OSX)
-		fileDescriptor = open(path, readWriteParam | O_NOCTTY | O_EXLOCK)
+		fileDescriptor = open(path, readWriteParam | O_NOCTTY | O_EXLOCK | O_NONBLOCK)
 		#endif
 
 		// Throw error if open() failed