Bouke / HAP

Swift implementation of the Homekit Accessory Protocol
https://boukehaarsma.nl/HAP/
MIT License
366 stars 50 forks source link

Server.Connection fix race condition #52

Closed gbrooker closed 6 years ago

gbrooker commented 6 years ago

Writes or socket closure may occur asynchronously on different threads. Race conditions are avoided by performing writes and closure on a private serial queue. Connection().listen() now closes a socket before returning.

gbrooker commented 6 years ago

There seems to be a problem with the travis build not being able to load your CLibSodium library From the travis log:

...
Fetching https://github.com/Coder-256/Regex.git
error: failed to clone; Cloning into bare repository '/Users/travis/build/Bouke/HAP/.build/repositories/CLibSodium.git--9212624310367625262'...
fatal: unable to access 'https://github.com/Bouke/CLibSodium.git/': Could not resolve host: github.com
...
Bouke commented 6 years ago

Thanks, looks like a nice change to have in.