pyzeroconf
pyzeroconf copied to clipboard
Prevented EBADF errors caused by closing sockets prematurely.
Zeroconf.close() immediately closed sockets which child threads may still need to finish their operations. This was causing EBADF (bad file descriptor) errors in some cases. Zeroconf.close() now blocks until all known child threads have stopped then closes the sockets safely.
Added a test and incidentally fixed some tests that weren't running.
Wrong fork. Please do not merge.