socket_duplex 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/socket_duplex.rb +7 -6
- data/socket_duplex.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb0e53fafae37cdc9a6719ec229bceb284aa4bf
|
4
|
+
data.tar.gz: 105aacabc8f3d8164e101f4640bf9c7a972e2480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 085d9e344a85301d5223504012ec04ddbe01649a588234b5466cfb56d2503758f69439f5e7e87eec5597c0513ba10b58ecbe6b3bf5278bcb51994b3d6a8d5306
|
7
|
+
data.tar.gz: b9f40079b136c08196986b121485039dadbcbc4ee77aa2616b117a4c4403ef68ab29f9c16d1fe5c49961dd98a5d9180d4075b2303c2a3356cfc5bddc9679dd27
|
data/lib/socket_duplex.rb
CHANGED
@@ -48,7 +48,7 @@ module Rack
|
|
48
48
|
puts 'secful: _call'
|
49
49
|
status, headers, body = @app.call(env)
|
50
50
|
puts 'secful: app.call'
|
51
|
-
puts 'secful: queue.len = ' + @queue.length
|
51
|
+
puts 'secful: queue.len = ' + @queue.length.to_s
|
52
52
|
if @queue.length < @queue.max
|
53
53
|
puts 'secful: put in queue'
|
54
54
|
@queue << env
|
@@ -107,15 +107,16 @@ module Rack
|
|
107
107
|
def handle_request(env)
|
108
108
|
request_hash = {}
|
109
109
|
if env['rack.url_scheme'] == 'http'
|
110
|
-
puts 'writing env'
|
110
|
+
puts 'secful: writing env'
|
111
111
|
write_env(request_hash, env)
|
112
112
|
ws = @threads_to_sockets[Thread.current]
|
113
113
|
begin
|
114
|
-
puts 'sending'
|
114
|
+
puts 'secful: sending'
|
115
115
|
ws.send request_hash.to_json
|
116
|
-
puts 'sent'
|
117
|
-
rescue Exception
|
118
|
-
puts '
|
116
|
+
puts 'secful: sent'
|
117
|
+
rescue Exception => e
|
118
|
+
puts 'secful: handle_request-exception: ' + e.message
|
119
|
+
puts 'secful: handle_request-trace: ' + e.backtrace.inspect
|
119
120
|
if ws
|
120
121
|
ws.close()
|
121
122
|
end rescue nil
|
data/socket_duplex.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "socket_duplex"
|
6
|
-
spec.version = '1.1.
|
6
|
+
spec.version = '1.1.3'
|
7
7
|
spec.authors = ["Secful"]
|
8
8
|
spec.description = %q{Rack middleware that duplexes HTTP traffic}
|
9
9
|
spec.summary = spec.description
|