Skip to content

Commit

Permalink
Merge pull request #1674 from getfiit/WebSocketTransport_retain
Browse files Browse the repository at this point in the history
don't retain WebSocketTransport during reconnect
  • Loading branch information
designatednerd authored Feb 22, 2021
2 parents b7f6d30 + 4cef3c5 commit cd9a77b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ApolloWebSocket/WebSocketTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ extension WebSocketTransport: WebSocketDelegate {
return
}

DispatchQueue.main.asyncAfter(deadline: .now() + reconnectionInterval) {
self.websocket.connect()
DispatchQueue.main.asyncAfter(deadline: .now() + reconnectionInterval) { [weak self] in
self?.websocket.connect()
}
}
}

0 comments on commit cd9a77b

Please sign in to comment.