GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Ashish] catch specific disconnect errors · morphiens/pythoncan@02dd957

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • can/interfaces/morphle_eth2can
    • morphle_eth2can.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎can/interfaces/morphle_eth2can/morphle_eth2can.py‎

Copy file name to clipboardExpand all lines: can/interfaces/morphle_eth2can/morphle_eth2can.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
https://www.uotek.com/Uploads/file/20230210/20230210143551_12219.pdf
66
"""
77
import datetime
8+
import errno
89
import logging
910
import select
1011
import socket
@@ -491,6 +492,11 @@ def _check_socket_health(self) -> bool:
491492
log.warning("[eth2can] _check_socket_health: recv peek returned empty (connection closed)")
492493
return False
493494
except (OSError, socket.error) as e:
495+
if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK):
496+
# EAGAIN/EWOULDBLOCK from MSG_DONTWAIT recv means no data available right now —
497+
# not a dead socket. The select() indicated readable but the data was already
498+
# consumed (e.g. by the notifier thread) between select and recv. Socket is healthy.
499+
return True
494500
log.warning(f"[eth2can] _check_socket_health: socket error during health check: {e}")
495501
return False
496502
return True

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.