Merge branch 'v12.1.3'

* v12.1.3:
  bump version
  Fix #855
This commit is contained in:
Erik Little 2017-11-08 08:33:33 -05:00
commit 6905113b49
No known key found for this signature in database
GPG Key ID: 62F837E56F4E9320
3 changed files with 9 additions and 6 deletions

View File

@ -93,7 +93,7 @@ Then import `import SocketIO`.
### Carthage ### Carthage
Add this line to your `Cartfile`: Add this line to your `Cartfile`:
``` ```
github "socketio/socket.io-client-swift" ~> 12.1.2 # Or latest version github "socketio/socket.io-client-swift" ~> 12.1.3 # Or latest version
``` ```
Run `carthage update --platform ios,macosx`. Run `carthage update --platform ios,macosx`.
@ -107,7 +107,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
use_frameworks! use_frameworks!
target 'YourApp' do target 'YourApp' do
pod 'Socket.IO-Client-Swift', '~> 12.1.2' # Or latest version pod 'Socket.IO-Client-Swift', '~> 12.1.3' # Or latest version
end end
``` ```

View File

@ -1,7 +1,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift" s.name = "Socket.IO-Client-Swift"
s.module_name = "SocketIO" s.module_name = "SocketIO"
s.version = "12.1.2" s.version = "12.1.3"
s.summary = "Socket.IO-client for iOS and OS X" s.summary = "Socket.IO-client for iOS and OS X"
s.description = <<-DESC s.description = <<-DESC
Socket.IO-client for iOS and OS X. Socket.IO-client for iOS and OS X.
@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.requires_arc = true s.requires_arc = true
s.source = { s.source = {
:git => "https://github.com/socketio/socket.io-client-swift.git", :git => "https://github.com/socketio/socket.io-client-swift.git",
:tag => 'v12.1.2', :tag => 'v12.1.3',
:submodules => true :submodules => true
} }
s.pod_target_xcconfig = { s.pod_target_xcconfig = {

View File

@ -563,8 +563,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
pongsMissed += 1 pongsMissed += 1
write("", withType: .ping, withData: []) write("", withType: .ping, withData: [])
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self] in engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
self?.sendPing() // Make sure not to ping old connections
guard let this = self, this.sid == id else { return }
this.sendPing()
} }
} }