summaryrefslogtreecommitdiffstats
path: root/git_trace2_event_log_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git_trace2_event_log_base.py')
-rw-r--r--git_trace2_event_log_base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/git_trace2_event_log_base.py b/git_trace2_event_log_base.py
index f5424249..2f1aac76 100644
--- a/git_trace2_event_log_base.py
+++ b/git_trace2_event_log_base.py
@@ -38,6 +38,8 @@ import tempfile
38import threading 38import threading
39 39
40 40
41# Timeout when sending events via socket (applies to connect, send)
42SOCK_TIMEOUT = 0.5 # in seconds
41# BaseEventLog __init__ Counter that is consistent within the same process 43# BaseEventLog __init__ Counter that is consistent within the same process
42p_init_count = 0 44p_init_count = 0
43 45
@@ -296,6 +298,7 @@ class BaseEventLog:
296 with socket.socket( 298 with socket.socket(
297 socket.AF_UNIX, socket.SOCK_STREAM 299 socket.AF_UNIX, socket.SOCK_STREAM
298 ) as sock: 300 ) as sock:
301 sock.settimeout(SOCK_TIMEOUT)
299 sock.connect(path) 302 sock.connect(path)
300 self._WriteLog(sock.sendall) 303 self._WriteLog(sock.sendall)
301 return f"af_unix:stream:{path}" 304 return f"af_unix:stream:{path}"