Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
Added Swift 4.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Baitaliuk committed Oct 14, 2018
1 parent 4e9a399 commit 933ac84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2
2 changes: 1 addition & 1 deletion ClusterWS-Client-Swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ClusterWS-Client-Swift'
s.version = '3.0.2'
s.version = '3.1.0'
s.summary = 'Swift Client for ClusterWS'
s.description = 'Swift Client for ClusterWS - lightweight, fast and powerful framework for building horizontally & vertically scalable WebSocket applications in Node.js'
s.homepage = 'https://github.com/ClusterWS/ClusterWS-Client-Swift'
Expand Down
10 changes: 5 additions & 5 deletions Sources/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ private class InnerWebSocket: Hashable {
}

func closeConn() {
rd.remove(from: RunLoop.main, forMode: RunLoopMode.defaultRunLoopMode)
wr.remove(from: RunLoop.main, forMode: RunLoopMode.defaultRunLoopMode)
rd.remove(from: RunLoop.main, forMode: RunLoop.Mode.default)
wr.remove(from: RunLoop.main, forMode: RunLoop.Mode.default)
rd.delegate = nil
wr.delegate = nil
rd.close()
Expand Down Expand Up @@ -1087,8 +1087,8 @@ private class InnerWebSocket: Hashable {
}
rd.delegate = delegate
wr.delegate = delegate
rd.schedule(in: RunLoop.main, forMode: RunLoopMode.defaultRunLoopMode)
wr.schedule(in: RunLoop.main, forMode: RunLoopMode.defaultRunLoopMode)
rd.schedule(in: RunLoop.main, forMode: RunLoop.Mode.default)
wr.schedule(in: RunLoop.main, forMode: RunLoop.Mode.default)
rd.open()
wr.open()
try write(header, length: header.count)
Expand Down Expand Up @@ -1650,7 +1650,7 @@ open class WebSocket: NSObject {
fileprivate var ws: InnerWebSocket
fileprivate var id = manager.nextId()
fileprivate var opened: Bool
open override var hashValue: Int { return id }
open override var hash: Int { return id }
/// Create a WebSocket connection to a URL; this should be the URL to which the WebSocket server will respond.
public convenience init(_ url: String){
self.init(request: URLRequest(url: URL(string: url)!), subProtocols: [])
Expand Down

0 comments on commit 933ac84

Please sign in to comment.