Add a method to close the GatewayClient.