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


Closes the websocket connection if the transport is a WebSocketNetworkTransport.

A response is emitted with ApolloResponse.exception set to ApolloWebSocketForceCloseException.