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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec32418dd0c63c1b0c39c9be6b5197d236a5bd69
4
- data.tar.gz: af7fd2a98b314685e8778a920144e1d036433f62
3
+ metadata.gz: 0fb0e53fafae37cdc9a6719ec229bceb284aa4bf
4
+ data.tar.gz: 105aacabc8f3d8164e101f4640bf9c7a972e2480
5
5
  SHA512:
6
- metadata.gz: 980e3b5ca6cc11c3e844fba8cfbe879be812da9ee1a3c61430ea9e721c361d5f05ea73a1f8b89f11183499217a195de81066221059868a560b7d9dfcb7745405
7
- data.tar.gz: bd89f149880ee585a3e7c5255b53f3ad34c786d0e3b251e0a08e01b3e175e52e45910db241508296e298371840cbff2997285bb0c5ec824416883ed9d6418e33
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 'error on sending'
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
@@ -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.2'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socket_duplex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Secful