KaneCheshire / Peasy

A pure Swift mock server for embedding and running directly within iOS/macOS UI tests. Easy peasy.
MIT License
38 stars 10 forks source link

Stopping and restarting a server on the same address crashes #3

Closed KaneCheshire closed 4 years ago

KaneCheshire commented 4 years ago

The way it's currently set up (with not great error handling) is that if you stop and immediately restart the server with the same port and address it crashes.

Although Peasy does close ports when they're deinitialized, there's some odd behaviour with the InputLoop which stops it from closing immediately.

Probably easily rectified by explicitly closing things rather than waiting for deinits.