@@ -230,7 +230,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
230230 /// - parameter event: The event to send.
231231 /// - parameter items: The items to send with this event. May be left out.
232232 /// - parameter completion: Callback called on transport write completion.
233- open func emit( _ event: String , _ items: SocketData ... , completion: @escaping ( ( ) -> ( ) ) ? = nil ) {
233+ open func emit( _ event: String , _ items: SocketData ... , completion: ( ( ) -> ( ) ) ? = nil ) {
234234 do {
235235 try emit ( event, with: items. map ( { try $0. socketRepresentation ( ) } ) , completion: completion)
236236 } catch {
@@ -256,7 +256,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
256256 /// - parameter items: The items to send with this event. Send an empty array to send no data.
257257 /// - parameter completion: Callback called on transport write completion.
258258 @objc
259- open func emit( _ event: String , with items: [ Any ] , completion: @escaping ( ( ) -> ( ) ) ? = nil ) {
259+ open func emit( _ event: String , with items: [ Any ] , completion: ( ( ) -> ( ) ) ? = nil ) {
260260 emit ( [ event] + items, completion: completion)
261261 }
262262
@@ -317,13 +317,13 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
317317 ack: Int ? = nil ,
318318 binary: Bool = true ,
319319 isAck: Bool = false ,
320- completion: @escaping ( ( ) -> ( ) ) ? = nil
320+ completion: ( ( ) -> ( ) ) ? = nil
321321 ) {
322322 // wrap the completion handler so it always runs async via handlerQueue
323323 let wrappedCompletion : ( ( ) -> ( ) ) ? = ( completion == nil ) ? nil : { [ weak self] in
324324 guard let this = self else { return }
325325 this. manager? . handleQueue. async {
326- completion ( )
326+ completion! ( )
327327 }
328328 }
329329
0 commit comments