File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
lib/embulk/output/bigquery Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,17 @@ def with_network_retry(&block)
49
49
retries = 0
50
50
begin
51
51
yield
52
- rescue ::Java ::Java . net . SocketException , ::Java ::Java . net . ConnectException => e
53
- if [ 'Broken pipe' , 'Connection reset' , 'Connection timed out' ] . include? ( e . message )
52
+
53
+ # httpclient which google-api-ruby-client depends on, catches java.net.SocketException and java.net.ConnectionException and
54
+ # raises SSLError.
55
+ # https://github.com/nahi/httpclient/blob/4658227a46f7caa633ef8036f073bbd1f0a955a2/lib/httpclient/jruby_ssl_socket.rb#L124-L134
56
+ rescue OpenSSL ::SSL ::SSLError => e
57
+ retry_messages = [
58
+ "Java::JavaNet::SocketException: Connection reset" ,
59
+ "Java::JavaNet::SocketException: Broken pipe" ,
60
+ "Java::JavaNet::ConnectException: Connection timed out" ,
61
+ ]
62
+ if retry_messages . include? ( e . message )
54
63
if retries < @task [ 'retries' ]
55
64
retries += 1
56
65
Embulk . logger . warn { "embulk-output-bigquery: retry \# #{ retries } , #{ e . class } #{ e . message } " }
You can’t perform that action at this time.
0 commit comments