Skip to content

Commit afb8759

Browse files
update the value of being connected before trying to init the server
1 parent 97fd165 commit afb8759

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/ApolloWebSocket/WebSocketTransport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ extension WebSocketTransport: WebSocketDelegate {
422422

423423
public func handleConnection() {
424424
self.error.mutate { $0 = nil }
425-
initServer()
426425
self.isSocketConnected.mutate { $0 = true }
426+
initServer()
427427
if self.reconnected {
428428
self.delegate?.webSocketTransportDidReconnect(self)
429429
// re-send the subscriptions whenever we are re-connected

0 commit comments

Comments
 (0)