Skip to content

Commit

Permalink
Merge pull request #1463 from davidkessler-ch/master
Browse files Browse the repository at this point in the history
fix never running timingOut due to weak self capture
  • Loading branch information
nuclearace authored Nov 13, 2023
2 parents 71a627c + a21af10 commit 76b9419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/SocketIO/Ack/SocketAckEmitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ public final class OnAckCallback: NSObject {

guard seconds != 0 else { return }

socket.manager?.handleQueue.asyncAfter(deadline: DispatchTime.now() + seconds) {[weak socket, weak self] in
guard let socket = socket, let `self` = self else { return }
socket.manager?.handleQueue.asyncAfter(deadline: DispatchTime.now() + seconds) {[weak socket] in
guard let socket = socket else { return }

socket.ackHandlers.timeoutAck(self.ackNumber)
}
Expand Down

0 comments on commit 76b9419

Please sign in to comment.