Compare commits

...
2 Commits
Author SHA1 Message Date
Erik 15dfba42a7 bump version 2016-02-04 10:15:50 -05:00
Erik 76ef3596f0 possible fix for socketio/socket.io-client-swift#279 2016-02-01 21:56:49 -05:00
5 changed files with 12 additions and 14 deletions

No files matched your search

+3 -3
View File
@@ -86,7 +86,7 @@ Carthage
-----------------
Add this line to your `Cartfile`:
```
github "socketio/socket.io-client-swift" ~> 5.3.1 # Or latest version
github "socketio/socket.io-client-swift" ~> 5.3.2 # Or latest version
```
Run `carthage update --platform ios,macosx`.
@@ -100,7 +100,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Socket.IO-Client-Swift', '~> 5.3.1' # Or latest version
pod 'Socket.IO-Client-Swift', '~> 5.3.2' # Or latest version
```
Install pods:
@@ -128,7 +128,7 @@ CocoaSeeds
Add this line to your `Seedfile`:
```
github "socketio/socket.io-client-swift", "v5.3.1", :files => "Source/*.swift" # Or latest version
github "socketio/socket.io-client-swift", "v5.3.2", :files => "Source/*.swift" # Or latest version
```
Run `seed install`.
+2 -2
View File
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.module_name = "SocketIOClientSwift"
s.version = "5.3.1"
s.version = "5.3.2"
s.summary = "Socket.IO-client for iOS and OS X"
s.description = <<-DESC
Socket.IO-client for iOS and OS X.
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v5.3.1' }
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v5.3.2' }
s.source_files = "Source/**/*.swift"
s.requires_arc = true
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
+2 -3
View File
@@ -378,9 +378,8 @@ public final class SocketEngine: NSObject, SocketEnginePollable, SocketEngineWeb
public func open() {
if connected {
DefaultSocketLogger.Logger.error("Engine tried opening while connected. This is probably a programming error. "
+ "Abandoning open attempt", type: logType)
return
DefaultSocketLogger.Logger.error("Engine tried opening while connected. Assuming this was a reconnect", type: logType)
close("reconnect")
}
DefaultSocketLogger.Logger.log("Starting engine", type: logType)
+4 -5
View File
@@ -309,9 +309,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
if status == .Closed || !reconnects {
didDisconnect(reason)
} else if status != .Reconnecting {
status = .Reconnecting
handleEvent("reconnect", data: [reason], isInternalMessage: true)
tryReconnect()
tryReconnectWithReason(reason)
}
}
@@ -456,7 +454,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
Tries to reconnect to the server.
*/
public func reconnect() {
tryReconnect()
tryReconnectWithReason("manual reconnect")
}
/**
@@ -467,9 +465,10 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
handlers.removeAll(keepCapacity: false)
}
private func tryReconnect() {
private func tryReconnectWithReason(reason: String) {
if reconnectTimer == nil {
DefaultSocketLogger.Logger.log("Starting reconnect", type: logType)
handleEvent("reconnect", data: [reason], isInternalMessage: true)
status = .Reconnecting
+1 -1
View File
@@ -65,4 +65,4 @@ struct SocketStringReader {
mutating func readUntilEnd() -> String {
return read(currentIndex.distanceTo(message.endIndex))
}
}
}