kraken-js
kraken-js copied to clipboard
shutdown middleware assumes a single server.
If a client started both http and https servers on the same kraken app, shutdown middleware would only attempt to stop one server.
I wonder if there's a way to solve this. 1:N app:server is tough for this kind of thing, since the app doesn't really know about the servers that will call it.
Potentially server
can be changed to an array and you can just accumulate the list of servers you have seen so far at https://github.com/krakenjs/kraken-js/blob/d37c1bc3b498163b5d89e850252b0bc8b2033f72/middleware/shutdown.js#L65 instead of only saving the server from the first request.