release http socket properly

fixes #312 #322 

This should now release the socket before it was not getting released as exitprocess was false. We should look in a bit more about how we handle exitProcess.