use process.exit instead of process.kill when connection is closed