jembi/openhim-core-js — pull request #241 by rcrichton (2014-10-22 12:04:25+00:00)
Title: Destroy active connections when stopping the server

Closes #239

I'm not 100% happy with this implementation. What I really wanted to do was `.end()` each active socket but when I try to do that I get a segmentation fault from one of nodes native modules. I can't figure out what is causing this so I've changed the code to `.destroy()` active sockets rather. I don't really like this as if data is currently being send along this socket then it will be lost or cut off. This could be ok if we give an appropriate warning but it would be best if we could request that the socket closes and let it finish up before shutting down.

I not sure what we should do in this case.