Gracefully close socket on SIGINT