Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/pod_logs_non_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def stream_logs():
)

# 👇 make socket non-blocking with timeout
# Note: when streaming logs with _preload_content=False, the transport may
# deliver arbitrary chunk boundaries, so callers should split or buffer data
# themselves if they need line-oriented processing.
resp._fp.fp.raw._sock.settimeout(1)

try:
Expand Down