adafruit / adafruit/Adafruit_CircuitPython_Wiznet5k

Shouldn't calls that time out raise errors?

Open Beginner friendly
#136 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
34
PR merge metrics
No merged PRs in 30d

Description

If I’m understanding the Python sockets [docs](https://docs.python.org/3/library/socket.html#socket.timeout) correctly, a socket with timeout enabled should raise an error. But `recv()`, at least, just [returns](https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/blob/f3070a3ecf91ffeee56bc4e23fbcec15ea071839/adafruit_wiznet5k/adafruit_wiznet5k_socket.py#L501) an empty byte object on timeout.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in adafruit_wiznet5k/adafruit_wiznet5k_socket.py at the recv() implementation linked in the issue, then compare its timeout behavior with Python's socket.timeout documentation. Confirm the expected behavior for a timed-out call and add or update coverage so the implementation reports the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.