Bouke / HAP

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

Only shutdown the EventLoopGroup if it was created by this instance #131

Closed gbrooker closed 3 years ago

gbrooker commented 3 years ago

Currently, calling stop() on a HAP Server will shutdown the NIO event loop group, no matter whether it was created by that Server instance or provided by a caller. This PR will ensure that if the EventLoopGroup is provided in the initialiser, and hence most likely shared with other Servers and NIO channels, then stopping the server will not shutdown the event loop.

Bouke commented 3 years ago

Nice fix!