thrift_client 0.3.1 → 0.3.2

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/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v0.3.2. Fix connection close bug (nkallen, mattknox).
3
+
2
4
  v0.3.1. Add ability to reset connection after N requests.
3
5
 
4
6
  v0.3. Change default timeout semantics; hash default was too sneaky. Fix bug.
data/lib/thrift_client.rb CHANGED
@@ -95,6 +95,7 @@ Valid optional parameters are:
95
95
  @current_server = server
96
96
  @client = @client_class.new(@options[:protocol].new(@transport, *@options[:protocol_extra_params]))
97
97
  rescue Thrift::TransportException
98
+ @transport.close rescue nil
98
99
  retry
99
100
  end
100
101
 
@@ -125,13 +126,10 @@ Valid optional parameters are:
125
126
  rescue NoServersAvailable => e
126
127
  handle_exception(e, method_name, args)
127
128
  rescue *@options[:exception_classes] => e
129
+ disconnect!(false)
128
130
  tries ||= @retries
129
- if (tries -= 1) == 0
130
- handle_exception(e, method_name, args)
131
- else
132
- disconnect!(false)
133
- retry
134
- end
131
+ tries -= 1
132
+ tries == 0 ? handle_exception(e, method_name, args) : retry
135
133
  end
136
134
 
137
135
  def set_timeout!(method_name)
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{thrift_client}
5
- s.version = "0.3.1"
5
+ s.version = "0.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
9
  s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2009-11-30}
10
+ s.date = %q{2009-12-10}
11
11
  s.description = %q{A Thrift client wrapper that encapsulates some common failover behavior.}
12
12
  s.email = %q{}
13
13
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/thrift_client.rb", "lib/thrift_client/thrift.rb"]
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- C�ǝ���M6��s��Cm"O���(��6������Ŭm>!8���Z�.�"s{��P
2
- َ�\� l�ˀ�a
1
+ �2���G�����(�QrJw�n�^ �48%�NnY�2�vL�X}4b<��n�6UD3�q̜�ퟆg�g3�V��r-�XF�x�zb?�Ŭy�G:�[AnauFK�� �j�Q�I_����b��LZ�8 ����׍q�� ꃁl���۠$���O BT���M��?�kV���q�(�w�eL��-�y[��.&�
2
+ ��؀ᠠ�=�~���ǘ���߉rκ])�wgzl;0b�e��?�2��7DF��s|�
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrift_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -30,7 +30,7 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-11-30 00:00:00 -08:00
33
+ date: 2009-12-10 00:00:00 -08:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file