websocket-driver 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/websocket/driver/hybi.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1bf44c48fb73c1472cc8c5752bc87cd38f545bf
|
4
|
+
data.tar.gz: 9a95a47349ec213020574596650c27d50db93fa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddf6c23ad1b0f2a9f9c5f4f67978efbec3916bb26754941008da6a488ea5b151ddd504664699cbf1bcee422aaea2b860955af9ccd5f257266be33e7f344be2fd
|
7
|
+
data.tar.gz: cf55f6a6e0c62790f8b40efa7af9fdb174e354b8a2d14c218a6421f3258c8c2237c38449eb100e53c650191da8df8df35039e6456acf3c783ba2eeccbe79e70a
|
data/CHANGELOG.md
CHANGED
@@ -47,6 +47,7 @@ module WebSocket
|
|
47
47
|
}
|
48
48
|
|
49
49
|
ERROR_CODES = ERRORS.values
|
50
|
+
DEFAULT_ERROR_CODE = 1000
|
50
51
|
MIN_RESERVED_ERROR = 3000
|
51
52
|
MAX_RESERVED_ERROR = 4999
|
52
53
|
|
@@ -354,7 +355,7 @@ module WebSocket
|
|
354
355
|
@message << frame
|
355
356
|
|
356
357
|
when OPCODES[:close] then
|
357
|
-
code = (bytesize >= 2) ?
|
358
|
+
code = (bytesize >= 2) ? payload.unpack(PACK_FORMATS[2]).first : nil
|
358
359
|
reason = (bytesize > 2) ? Driver.encode(bytes[2..-1] || [], :utf8) : nil
|
359
360
|
|
360
361
|
unless (bytesize == 0) or
|
@@ -367,7 +368,7 @@ module WebSocket
|
|
367
368
|
code = ERRORS[:protocol_error]
|
368
369
|
end
|
369
370
|
|
370
|
-
shutdown(code, reason || '')
|
371
|
+
shutdown(code || DEFAULT_ERROR_CODE, reason || '')
|
371
372
|
|
372
373
|
when OPCODES[:ping] then
|
373
374
|
frame(payload, :pong)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocket-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Coglan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-extensions
|