kraken-js icon indicating copy to clipboard operation
kraken-js copied to clipboard

shutdown middleware assumes a single server.

Open totherik opened this issue 10 years ago • 2 comments

If a client started both http and https servers on the same kraken app, shutdown middleware would only attempt to stop one server.

totherik avatar Jun 06 '14 16:06 totherik

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.

aredridel avatar Nov 03 '14 18:11 aredridel

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.

dougwilson avatar May 06 '15 05:05 dougwilson