no need to capture completion hander in wrapper
This commit is contained in:
parent
28fad62ccd
commit
d763fad449
@ -296,7 +296,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
|||||||
|
|
||||||
func emit(_ data: [Any], ack: Int? = nil, binary: Bool = true, isAck: Bool = false, completion: (() -> ())? = nil) {
|
func emit(_ data: [Any], ack: Int? = nil, binary: Bool = true, isAck: Bool = false, completion: (() -> ())? = nil) {
|
||||||
// wrap the completion handler so it always runs async via handlerQueue
|
// wrap the completion handler so it always runs async via handlerQueue
|
||||||
let wrappedCompletion = {[weak self, completion] in
|
let wrappedCompletion = {[weak self] in
|
||||||
guard let this = self else { return }
|
guard let this = self else { return }
|
||||||
this.manager?.handleQueue.async { completion?() }
|
this.manager?.handleQueue.async { completion?() }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user