proxymachine 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ = 1.2.1 / 2010-02-11
2
+ * Bug fixes
3
+ * Don't count client closes as connection errors
4
+
1
5
  = 1.2.0 / 2010-02-09
2
6
  * New Features
3
7
  * Connection Errors and Timeouts
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
5
5
  :build:
@@ -26,7 +26,12 @@ class ProxyMachine
26
26
 
27
27
  def unbind
28
28
  now = Time.now
29
- if !@connected
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.0"
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-09}
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"]
@@ -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.0
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-09 00:00:00 -08:00
12
+ date: 2010-02-11 00:00:00 -08:00
13
13
  default_executable: proxymachine
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency