litecable 0.8.0 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce37cbd6931242e4cc18f8679e3131e3b7e1dab3b589576408b7a8b3d70737ae
4
- data.tar.gz: e12346809a6b05538edb6d417ba99fa72ae465bfb79775a0f7e046cc8070e2fb
3
+ metadata.gz: 32ff8b3afed52c07f56d68c95569a04a31c6b839e0eb8804e2b02b2c2faf5de9
4
+ data.tar.gz: f08c8ca70c9fa05702b7f1c3fb3de79d46c0a263b0c2978ef4162aa31230c1b5
5
5
  SHA512:
6
- metadata.gz: 9f3a5bd03cb018458eb5c9c447e3f2ae240cf92d91c071c6aec89c067753bd63b023f23a7c1dea6261b2457236466e1b8dcd07f27413d7dd1aeeeb70bb5579ef
7
- data.tar.gz: 1972ce3fd5adc6305a22fbfcd174ee5ec5f74fba22e553e714159b5b9c822fd3d1bcbbc774a9630292e9002bfb61e4d80c0c0916a1001d3462a84433002b8651
6
+ metadata.gz: 41b8deef46807cd381055c86c4b3c6ba32dd9a158b8638502b128d275ab9566da268202d158339edbbd9181ef9ee539d9c96a0a02582b195604b1feca3e37ef7
7
+ data.tar.gz: 7be3d1ace4aa41c5c9b0fb2aa023e8be98313f5c1a37bf0ac9cd2a886e19e507b6412f0a7545bcf28f3959b778e43c28cb11b252050730c9a724ecdd7f1eb155
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.8.2 (2024-04-26)
6
+
7
+ - Fix handling reads on closed connections. ([@palkan][])
8
+
9
+ ## 0.8.1 (2023-08-22)
10
+
11
+ - Handle closing socket already closed by server. ([@palkan][])
12
+
5
13
  ## 0.8.0 (2023-03-08)
6
14
 
7
15
  - Allow using custom channel lookup logic. ([@palkan][])
@@ -39,7 +39,7 @@ module LiteCable
39
39
 
40
40
  def initialize(socket, identifiers: nil, **hargs)
41
41
  @encoded_ids = identifiers ? JSON.parse(identifiers) : {}
42
- super socket, **hargs
42
+ super(socket, **hargs)
43
43
  end
44
44
 
45
45
  def identifiers
@@ -114,7 +114,7 @@ module LiteCable
114
114
  frame = WebSocket::Frame::Outgoing::Server.new(version: version, type: :close, code: 1000)
115
115
  @socket.write(frame.to_s) if frame.supported?
116
116
  @socket.close
117
- rescue IOError, Errno::EPIPE, Errno::ETIMEDOUT
117
+ rescue IOError, Errno::EPIPE, Errno::ETIMEDOUT, Errno::ECONNRESET
118
118
  # already closed
119
119
  end
120
120
 
@@ -137,7 +137,7 @@ module LiteCable
137
137
 
138
138
  while socket.wait_readable
139
139
  data = socket.respond_to?(:recv) ? socket.recv(2000) : socket.readpartial(2000)
140
- break if data.empty?
140
+ break if data.nil? || data.empty?
141
141
 
142
142
  framebuffer << data
143
143
  while frame = framebuffer.next # rubocop:disable Lint/AssignmentInCondition
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LiteCable
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litecable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config
@@ -187,7 +187,7 @@ metadata:
187
187
  documentation_uri: http://github.com/palkan/litecable
188
188
  homepage_uri: http://github.com/palkan/litecable
189
189
  source_code_uri: http://github.com/palkan/litecable
190
- post_install_message:
190
+ post_install_message:
191
191
  rdoc_options: []
192
192
  require_paths:
193
193
  - lib
@@ -202,8 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
- rubygems_version: 3.4.6
206
- signing_key:
205
+ rubygems_version: 3.4.19
206
+ signing_key:
207
207
  specification_version: 4
208
208
  summary: Fat-free ActionCable implementation
209
209
  test_files: []