closeConnection

Closes the websocket connection if the transport is a WebSocketNetworkTransport.

exception is passed down to ApolloResponse.exception so you can decide how to handle the exception for active subscriptions.

apolloClient.subscriptionNetworkTransport.closeConnection(DefaultApolloException("oh no!"))

See also

Throws