8000 esp32/modsocket: Handle poll of a closed socket. by dpgeorge · Pull Request #5788 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

esp32/modsocket: Handle poll of a closed socket. #5788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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 ports/esp32/modsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@ STATIC mp_uint_t socket_stream_write(mp_obj_t self_in, const void *buf, mp_uint_
STATIC mp_uint_t socket_stream_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg, int *errcode) {
socket_obj_t *socket = self_in;
if (request == MP_STREAM_POLL) {
if (socket->fd == -1) {
return MP_STREAM_POLL_NVAL;
}

fd_set rfds;
FD_ZERO(&rfds);
Expand Down
0