encoding should already be done at this point

This commit is contained in:
Erik 2016-06-06 15:41:19 -04:00
parent 71f9058723
commit e57bcba47d

View File

@ -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)