websocket-driver 0.6.1-java → 0.6.2-java

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
  SHA1:
3
- metadata.gz: 81bc9d0a2ba7b91d6f4bac417ea9de075d12d507
4
- data.tar.gz: bae681f507b1a96555ee445183e85db458c16d43
3
+ metadata.gz: c901112b6c0a993b2d8ef9aefb403a35f48ece9a
4
+ data.tar.gz: 4a2060e078501b09e32e25ce468572cc8510573d
5
5
  SHA512:
6
- metadata.gz: a814393c27746b08531bbe082552f3ba28009448822983ba4c4c75b054b0794e4ba1d6a1e2b42caed6ef2750229e97bfd26ee6d3b6668def7d1ce6a684f51d63
7
- data.tar.gz: 531b096bf58b8a9f16f2174447cf59aa4d01dd4c4b8883bf6d92051afdff8e2fbb469981229d5d07a0348aaad30d7dded377ca7a32424c59a95f6b8834fba33b
6
+ metadata.gz: ec00c1ae96b5c0e6ffdcb3511a142e53426bbdbee00c91ce1832b77259026bf029d62cbcdbf735e2b3b955bdaefc6b0ae4bf2144438bb004ba3322ac159216a1
7
+ data.tar.gz: b56f747f1de4c2876e6929a23fcea02621cb5e24679442f0623d7a0ae414da4dcc2b491ecc58c10dd955be88e77b3599649594534e144357a317c6fdea8f34da
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.6.2 / 2015-07-18
2
+
3
+ * When the peer sends a close frame with no error code, emit 1000
4
+
1
5
  ### 0.6.1 / 2015-07-13
2
6
 
3
7
  * Fix how events are stored in `EventEmitter` to fix a backward-compatibility
@@ -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) ? 256 * bytes[0] + bytes[1] : nil
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.1
4
+ version: 0.6.2
5
5
  platform: java
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: websocket-extensions