faye-websocket 0.10.3 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of faye-websocket might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/faye/adapters/thin.rb +2 -0
- data/lib/faye/rack_stream.rb +2 -0
- data/lib/faye/websocket.rb +1 -0
- data/lib/faye/websocket/api.rb +3 -0
- data/lib/faye/websocket/api/event_target.rb +6 -3
- metadata +2 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbd1159ad8b64ba0bc400f3a055c1e232605af0
|
4
|
+
data.tar.gz: b509699da5766504c7ae9d09df4f45689ca92073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e185f203d2283ced2859f58242549b506541afc5f67a97c694f7c0682cb6cd206afcad8ba62ddb5498fb333361ce57f216a3cfbe8c100cc94b7e312af176f36b
|
7
|
+
data.tar.gz: 536799ce4dbefa30ecdde546b33b715df3166f69d8fc48dc1ff33b8cbe7bb7703e05fafe6b31a08a707c2c1155c7fef0abdb3c74ea166e77fa9fd78949c9b318
|
data/CHANGELOG.md
CHANGED
data/lib/faye/adapters/thin.rb
CHANGED
@@ -29,6 +29,7 @@ class Thin::Connection
|
|
29
29
|
alias :thin_receive_data :receive_data
|
30
30
|
|
31
31
|
def process
|
32
|
+
@serving ||= nil
|
32
33
|
if @serving != :websocket and @request.websocket?
|
33
34
|
@serving = :websocket
|
34
35
|
end
|
@@ -41,6 +42,7 @@ class Thin::Connection
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def receive_data(data)
|
45
|
+
@serving ||= nil
|
44
46
|
return thin_receive_data(data) unless @serving == :websocket
|
45
47
|
socket_stream.receive(data) if socket_stream
|
46
48
|
end
|
data/lib/faye/rack_stream.rb
CHANGED
@@ -20,6 +20,8 @@ module Faye
|
|
20
20
|
@connection = socket.env['em.connection']
|
21
21
|
@stream_send = socket.env['stream.send']
|
22
22
|
|
23
|
+
@rack_hijack_io = @rack_hijack_io_reader = nil
|
24
|
+
|
23
25
|
hijack_rack_socket
|
24
26
|
|
25
27
|
@connection.socket_stream = self if @connection.respond_to?(:socket_stream)
|
data/lib/faye/websocket.rb
CHANGED
data/lib/faye/websocket/api.rb
CHANGED
@@ -36,6 +36,9 @@ module Faye
|
|
36
36
|
@ping_id = 0
|
37
37
|
@buffered_amount = 0
|
38
38
|
|
39
|
+
@close_params = @ping_timer = @proxy = @stream = nil
|
40
|
+
@onopen = @onmessage = @onclose = @onerror = nil
|
41
|
+
|
39
42
|
@driver.on(:open) { |e| open }
|
40
43
|
@driver.on(:message) { |e| receive_message(e.data) }
|
41
44
|
@driver.on(:close) { |e| begin_close(e.reason, e.code) }
|
@@ -37,8 +37,7 @@ module Faye::WebSocket::API
|
|
37
37
|
count = listener_count(event.type)
|
38
38
|
|
39
39
|
unless listener or count > 0
|
40
|
-
|
41
|
-
@buffers[event.type].push(event)
|
40
|
+
event_buffers[event.type].push(event)
|
42
41
|
end
|
43
42
|
|
44
43
|
listener.call(event) if listener
|
@@ -48,10 +47,14 @@ module Faye::WebSocket::API
|
|
48
47
|
private
|
49
48
|
|
50
49
|
def flush(event_type, listener)
|
51
|
-
if buffer =
|
50
|
+
if buffer = event_buffers.delete(event_type.to_s)
|
52
51
|
buffer.each { |event| listener.call(event) }
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
55
|
+
def event_buffers
|
56
|
+
@event_buffers ||= Hash.new { |k,v| k[v] = [] }
|
57
|
+
end
|
58
|
+
|
56
59
|
end
|
57
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faye-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Coglan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -73,9 +73,6 @@ dependencies:
|
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 2.0.0
|
76
|
-
- - "<"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 2.15.0
|
79
76
|
type: :development
|
80
77
|
prerelease: false
|
81
78
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,9 +80,6 @@ dependencies:
|
|
83
80
|
- - ">="
|
84
81
|
- !ruby/object:Gem::Version
|
85
82
|
version: 2.0.0
|
86
|
-
- - "<"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 2.15.0
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: rack
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|