Skip to content

Commit 2335cf3

Browse files
committed
Fix hang on socket errors by not using the logging system
1 parent 7ba58c9 commit 2335cf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logstash_async/transport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from requests.auth import HTTPBasicAuth
2525

2626
from logstash_async.constants import constants
27-
from logstash_async.utils import ichunked
27+
from logstash_async.utils import ichunked, safe_log_via_print
2828

2929

3030
logger = logging.getLogger(__name__)
@@ -171,7 +171,7 @@ def _try_to_close_socket(self):
171171
# ----------------------------------------------------------------------
172172
def _log_close_socket_error(self, exc):
173173
msg = f'Error on closing the transport socket: {exc}'
174-
logger.warning(msg)
174+
safe_log_via_print('warning', msg)
175175

176176
# ----------------------------------------------------------------------
177177
def close(self):

0 commit comments

Comments
 (0)