no need to capture completion hander in wrapper

This commit is contained in:
Andy 2018-10-02 19:05:22 +07:00
parent 28fad62ccd
commit d763fad449

View File

@ -296,7 +296,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
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
let wrappedCompletion = {[weak self, completion] in
let wrappedCompletion = {[weak self] in
guard let this = self else { return }
this.manager?.handleQueue.async { completion?() }
}