small tweaks

This commit is contained in:
Erik 2015-12-30 20:14:31 -05:00
parent 0ebe56d780
commit 7acce7d18e
2 changed files with 12 additions and 12 deletions

View File

@ -526,7 +526,8 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
*/ */
public func write(msg: String, withType type: SocketEnginePacketType, withData data: [NSData]) { public func write(msg: String, withType type: SocketEnginePacketType, withData data: [NSData]) {
dispatch_async(emitQueue) { dispatch_async(emitQueue) {
if self.connected { guard self.connected else { return }
if self.websocket { if self.websocket {
DefaultSocketLogger.Logger.log("Writing ws: %@ has data: %@", DefaultSocketLogger.Logger.log("Writing ws: %@ has data: %@",
type: self.logType, args: msg, data.count != 0) type: self.logType, args: msg, data.count != 0)
@ -539,7 +540,6 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
} }
} }
} }
}
// Polling methods // Polling methods
extension SocketEngine { extension SocketEngine {

View File

@ -68,7 +68,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
self.socketURL = socketURL["https?://"] ~= "" self.socketURL = socketURL["https?://"] ~= ""
for option in options ?? [] { for option in options {
switch option { switch option {
case .ConnectParams(let params): case .ConnectParams(let params):
connectParams = params connectParams = params