small tweaks
This commit is contained in:
parent
0ebe56d780
commit
7acce7d18e
@ -526,7 +526,8 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
|
||||
*/
|
||||
public func write(msg: String, withType type: SocketEnginePacketType, withData data: [NSData]) {
|
||||
dispatch_async(emitQueue) {
|
||||
if self.connected {
|
||||
guard self.connected else { return }
|
||||
|
||||
if self.websocket {
|
||||
DefaultSocketLogger.Logger.log("Writing ws: %@ has data: %@",
|
||||
type: self.logType, args: msg, data.count != 0)
|
||||
@ -539,7 +540,6 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Polling methods
|
||||
extension SocketEngine {
|
||||
|
||||
@ -68,7 +68,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
|
||||
|
||||
self.socketURL = socketURL["https?://"] ~= ""
|
||||
|
||||
for option in options ?? [] {
|
||||
for option in options {
|
||||
switch option {
|
||||
case .ConnectParams(let params):
|
||||
connectParams = params
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user