proxymachine 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/VERSION.yml +1 -1
- data/lib/proxymachine/server_connection.rb +6 -1
- data/proxymachine.gemspec +2 -2
- data/test/proxymachine_test.rb +8 -0
- metadata +2 -2
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
@@ -26,7 +26,12 @@ class ProxyMachine
|
|
26
26
|
|
27
27
|
def unbind
|
28
28
|
now = Time.now
|
29
|
-
if
|
29
|
+
if @client_side.error?
|
30
|
+
# the client side disconnected while we were in progress with
|
31
|
+
# the server. do nothing.
|
32
|
+
LOGGER.info "Client closed while server connection in progress. Dropping."
|
33
|
+
elsif !@connected
|
34
|
+
# a connection error or timeout occurred
|
30
35
|
@client_side.server_connection_failed
|
31
36
|
elsif !@data_received
|
32
37
|
if @timeout > 0.0 && (elapsed = now - @connected) >= @timeout
|
data/proxymachine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{proxymachine}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tom Preston-Werner"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-11}
|
13
13
|
s.default_executable = %q{proxymachine}
|
14
14
|
s.email = %q{tom@mojombo.com}
|
15
15
|
s.executables = ["proxymachine"]
|
data/test/proxymachine_test.rb
CHANGED
@@ -68,4 +68,12 @@ class ProxymachineTest < Test::Unit::TestCase
|
|
68
68
|
assert_equal "activity error: localhost:9980", File.read(@proxy_error_file)
|
69
69
|
sock.close
|
70
70
|
end
|
71
|
+
|
72
|
+
should "not consider client disconnect a server error" do
|
73
|
+
sock = TCPSocket.new('localhost', 9990)
|
74
|
+
sock.write('inactivity')
|
75
|
+
sock.close
|
76
|
+
sleep 3.1
|
77
|
+
assert !File.exist?(@proxy_error_file)
|
78
|
+
end
|
71
79
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxymachine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-11 00:00:00 -08:00
|
13
13
|
default_executable: proxymachine
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|