Skip to content

Commit

Permalink
fix: fix the exception that it is connected already when it connects
Browse files Browse the repository at this point in the history
  • Loading branch information
allenlinli committed Jan 2, 2020
1 parent a843176 commit f2c892b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/SocketIO/Client/SocketIOClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {

manager.handleQueue.asyncAfter(deadline: DispatchTime.now() + timeoutAfter) {[weak self] in
guard let this = self, this.status == .connecting || this.status == .notConnected else {
handler?()
guard self?.status == .connected else {
handler?()
return
}
return
}

Expand Down

0 comments on commit f2c892b

Please sign in to comment.