Don't close the server when client is closed. Add shutdown jsonrpc when closing server.