faye-websocket 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7f6e4a36da5e7abb23367c5cdc67313fa9f8183e7cbb113141d95c9d7a320dc
4
- data.tar.gz: 496722f6c8b15f286d31e25bd27f9699fa66842e781fa7bc2de3a0650d3cf5cd
3
+ metadata.gz: cda154bf0c9afde69a334635e2e3e98b71df172078b1b3d40d299b0819bc63a1
4
+ data.tar.gz: 64c3f2bf91578492b62d37dd4432c5242105285501d1d6dd53b6d3430d968e3b
5
5
  SHA512:
6
- metadata.gz: c26f0eda321c8c5479d21dc3e9ef4beeb8af728a963a2854fc13902841f53d5dcb049bdecb83793437e9dec86e2baf79103c9cc2f23f55e36db36aef543ab948
7
- data.tar.gz: 49d082032cc9ed4254730bb6a9b49aa157cb6d9eb16c6c04380dfc55a65e346fbf5e653a5f811e1836e3a750c897cc1b923e328f7b8a28fc7b312e2ce1d92bbd
6
+ metadata.gz: 32aa555eb9c89866e24af612ceb696fe426339d6526afa641e086202b276a2daeef7b36dfdb7d2bc0b11a09ebe9e2d2c4938adeff1fccdff42933a995c1cd63c
7
+ data.tar.gz: 91f69cfdfd8214edf1c4d3293112879b07fb085c047ad583358a495f97960615ad1d110a585c9a384bf7d09c5ec66385b519e41e3df7ec27fb8f87cb9072cf4c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.13.1 / 2026-11-26
2
+
3
+ - Send the client's WebSocket handshake request after EventMachine's
4
+ `ssl_handshake_completed` callback
5
+
1
6
  ### 0.13.0 / 2026-11-16
2
7
 
3
8
  - Add `allow_drafts` option to explicitly enable support for `draft75` and
@@ -14,6 +14,8 @@ module Faye
14
14
 
15
15
  def initialize(url, protocols = nil, options = {})
16
16
  @url = url
17
+ @uri = URI.parse(@url)
18
+
17
19
  super(options) {
18
20
  ::WebSocket::Driver.client(self,
19
21
  :max_length => options[:max_length],
@@ -51,25 +53,25 @@ module Faye
51
53
 
52
54
  @proxy.on(:connect) do
53
55
  @proxy = nil
54
- start_tls(URI.parse(@url), @origin_tls)
55
- @driver.start
56
+ @driver.start unless start_tls(@uri, @origin_tls)
56
57
  end
57
58
  end
58
59
 
59
60
  def start_tls(uri, options)
60
- return unless SECURE_PROTOCOLS.include?(uri.scheme)
61
+ return false unless SECURE_PROTOCOLS.include?(uri.scheme)
61
62
 
62
63
  tls_options = { :sni_hostname => uri.host, :verify_peer => true }.merge(options)
63
64
  @ssl_verifier = SslVerifier.new(uri.host, tls_options)
64
65
  @stream.start_tls(tls_options)
66
+
67
+ true
65
68
  end
66
69
 
67
70
  def on_connect(stream)
68
71
  @stream = stream
69
- start_tls(@endpoint, @socket_tls)
70
72
 
71
73
  worker = @proxy || @driver
72
- worker.start
74
+ worker.start unless start_tls(@endpoint, @socket_tls)
73
75
  end
74
76
 
75
77
  def on_network_error(error)
@@ -85,6 +87,8 @@ module Faye
85
87
 
86
88
  def ssl_handshake_completed
87
89
  @ssl_verifier.ssl_handshake_completed
90
+ worker = @proxy || @driver
91
+ worker.start
88
92
  rescue => error
89
93
  on_network_error(error)
90
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan