]> git.meshlink.io Git - meshlink/commit
Fix meshlink_stop() on Mac OS X.
authorGuus Sliepen <guus@meshlink.io>
Fri, 6 Nov 2015 22:33:58 +0000 (23:33 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sun, 25 Jun 2017 08:37:23 +0000 (10:37 +0200)
commitd25cba261290114e9d50cc3e30b8ebda4d77fc40
treea58b099e70a7c903536fc9ec0085a144ab6383ce
parent7b98381a4fcf38d98c72dcee908c43500efd493e
Fix meshlink_stop() on Mac OS X.

Mac OS X doesn't like shutdown(SHUT_RDWR) on listening sockets, and also
doesn't allow reopening a listening socket right after closing the
previous one on the same port. So avoid the whole business of closing
and reopening sockets by stopping the event loop and then doing a dummy
connect() to ourself to ensure select() in the network thread returns
immediately.

# Conflicts:
# src/meshlink.c
src/meshlink.c