Skip to content

Commit 6905113

Browse files
committed
Merge branch 'v12.1.3'
* v12.1.3: bump version Fix #855
2 parents 099c379 + 45af5d9 commit 6905113

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Then import `import SocketIO`.
9393
### Carthage
9494
Add this line to your `Cartfile`:
9595
```
96-
github "socketio/socket.io-client-swift" ~> 12.1.2 # Or latest version
96+
github "socketio/socket.io-client-swift" ~> 12.1.3 # Or latest version
9797
```
9898

9999
Run `carthage update --platform ios,macosx`.
@@ -107,7 +107,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
107107
use_frameworks!
108108

109109
target 'YourApp' do
110-
pod 'Socket.IO-Client-Swift', '~> 12.1.2' # Or latest version
110+
pod 'Socket.IO-Client-Swift', '~> 12.1.3' # Or latest version
111111
end
112112
```
113113

Diff for: Socket.IO-Client-Swift.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Socket.IO-Client-Swift"
33
s.module_name = "SocketIO"
4-
s.version = "12.1.2"
4+
s.version = "12.1.3"
55
s.summary = "Socket.IO-client for iOS and OS X"
66
s.description = <<-DESC
77
Socket.IO-client for iOS and OS X.
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717
s.requires_arc = true
1818
s.source = {
1919
:git => "https://github.com/socketio/socket.io-client-swift.git",
20-
:tag => 'v12.1.2',
20+
:tag => 'v12.1.3',
2121
:submodules => true
2222
}
2323
s.pod_target_xcconfig = {

Diff for: Source/SocketIO/Engine/SocketEngine.swift

+5-2
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
563563
pongsMissed += 1
564564
write("", withType: .ping, withData: [])
565565

566-
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self] in
567-
self?.sendPing()
566+
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
567+
// Make sure not to ping old connections
568+
guard let this = self, this.sid == id else { return }
569+
570+
this.sendPing()
568571
}
569572
}
570573

0 commit comments

Comments
 (0)