Skip to content

Commit 0579e7e

Browse files
committed
always set a session
1 parent aee0382 commit 0579e7e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Carthage
6969
-----------------
7070
Add this line to your `Cartfile`:
7171
```
72-
github "socketio/socket.io-client-swift" ~> 4.0.2 # Or latest version
72+
github "socketio/socket.io-client-swift" ~> 4.0.3 # Or latest version
7373
```
7474
7575
Run `carthage update --platform ios,macosx`.
@@ -83,7 +83,7 @@ source 'https://github.com/CocoaPods/Specs.git'
8383
platform :ios, '8.0'
8484
use_frameworks!
8585
86-
pod 'Socket.IO-Client-Swift', '~> 4.0.2' # Or latest version
86+
pod 'Socket.IO-Client-Swift', '~> 4.0.3' # Or latest version
8787
```
8888

8989
Install pods:
@@ -111,7 +111,7 @@ CocoaSeeds
111111
Add this line to your `Seedfile`:
112112

113113
```
114-
github "socketio/socket.io-client-swift", "v4.0.2", :files => "SocketIOClientSwift/*.swift" # Or latest version
114+
github "socketio/socket.io-client-swift", "v4.0.3", :files => "SocketIOClientSwift/*.swift" # Or latest version
115115
```
116116

117117
Run `seed install`.

Socket.IO-Client-Swift.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Socket.IO-Client-Swift"
3-
s.version = "4.0.2"
3+
s.version = "4.0.3"
44
s.summary = "Socket.IO-client for iOS and OS X"
55
s.description = <<-DESC
66
Socket.IO-client for iOS and OS X.
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.author = { "Erik" => "[email protected]" }
1313
s.ios.deployment_target = '8.0'
1414
s.osx.deployment_target = '10.10'
15-
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v4.0.2' }
15+
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v4.0.3' }
1616
s.source_files = "SocketIOClientSwift/**/*.swift"
1717
s.requires_arc = true
1818
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files

SocketIOClientSwift/SocketEngine.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
9393
continue
9494
}
9595
}
96+
97+
if session == nil {
98+
session = NSURLSession(configuration: .defaultSessionConfiguration(),
99+
delegate: nil,
100+
delegateQueue: workQueue)
101+
}
96102
}
97103

98104
public convenience init(client: SocketEngineClient, options: NSDictionary?) {

0 commit comments

Comments
 (0)