Try to reconnect if forcefully disconnected (with error), implement signal handling on Unix, exit gracefully