encoding should already be done at this point
This commit is contained in:
parent
71f9058723
commit
e57bcba47d
@ -279,8 +279,8 @@ public final class SocketEngine : NSObject, SocketEnginePollable, SocketEngineWe
|
|||||||
|
|
||||||
DefaultSocketLogger.Logger.log("Engine is being closed.", type: logType)
|
DefaultSocketLogger.Logger.log("Engine is being closed.", type: logType)
|
||||||
|
|
||||||
if closed {
|
if closed || !connected {
|
||||||
client?.engineDidClose(reason)
|
postSendClose(nil, nil, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ public final class SocketEngine : NSObject, SocketEnginePollable, SocketEngineWe
|
|||||||
guard let ws = self.ws else { return }
|
guard let ws = self.ws else { return }
|
||||||
|
|
||||||
for msg in postWait {
|
for msg in postWait {
|
||||||
ws.writeString(fixDoubleUTF8(msg))
|
ws.writeString(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
postWait.removeAll(keepCapacity: true)
|
postWait.removeAll(keepCapacity: true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user