closeConnection

Close the connection to the server (if it's open).

This can be used to force a reconnection to the server, for instance when new auth tokens should be passed to the headers.

The given reason will be propagated to Builder.reopenWhen to determine if the connection should be reopened. If not, it will be propagated to any Flows waiting for responses.