File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1919import contextlib
2020import logging
2121import os
22+ import socket
2223import sys
2324import time
2425import weakref
@@ -1030,8 +1031,8 @@ def _handle_connection_error(self, error: BaseException) -> None:
10301031 if self .is_sdam or type (error ) not in (AutoReconnect , NetworkTimeout ):
10311032 return
10321033 assert isinstance (error , AutoReconnect ) # Appease type checker.
1033- # If the original error was a certificate or SSL error, ignore it.
1034- if isinstance (error .__cause__ , (_CertificateError , SSLErrors )):
1034+ # If the original error was a DNS, certificate, or SSL error, ignore it.
1035+ if isinstance (error .__cause__ , (_CertificateError , SSLErrors , socket . gaierror )):
10351036 return
10361037 error ._add_error_label ("SystemOverloadedError" )
10371038 error ._add_error_label ("RetryableError" )
Original file line number Diff line number Diff line change 1919import contextlib
2020import logging
2121import os
22+ import socket
2223import sys
2324import time
2425import weakref
@@ -1026,8 +1027,8 @@ def _handle_connection_error(self, error: BaseException) -> None:
10261027 if self .is_sdam or type (error ) not in (AutoReconnect , NetworkTimeout ):
10271028 return
10281029 assert isinstance (error , AutoReconnect ) # Appease type checker.
1029- # If the original error was a certificate or SSL error, ignore it.
1030- if isinstance (error .__cause__ , (_CertificateError , SSLErrors )):
1030+ # If the original error was a DNS, certificate, or SSL error, ignore it.
1031+ if isinstance (error .__cause__ , (_CertificateError , SSLErrors , socket . gaierror )):
10311032 return
10321033 error ._add_error_label ("SystemOverloadedError" )
10331034 error ._add_error_label ("RetryableError" )
You can’t perform that action at this time.
0 commit comments