8000 esp32/modsocket: Check for pending events during blocking socket calls. · micropython/micropython@12a3fcc · GitHub
[go: up one dir, main page]

Skip to content

Commit 12a3fcc

Browse files
committed
esp32/modsocket: Check for pending events during blocking socket calls.
1 parent 5936168 commit 12a3fcc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ports/esp32/modsocket.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,8 @@ NORETURN static void exception_from_errno(int _errno) {
146146
mp_raise_OSError(_errno);
147147
}
148148

149-
void check_for_exceptions() {
150-
mp_obj_t exc = MP_STATE_VM(mp_pending_exception);
151-
if (exc != MP_OBJ_NULL) {
152-
MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
153-
nlr_raise(exc);
154-
}
149+
static inline void check_for_exceptions(void) {
150+
mp_handle_pending();
155151
}
156152

157153
static int _socket_getaddrinfo2(const mp_obj_t host, const mp_obj_t portx, struct addrinfo **resp) {

0 commit comments

Comments
 (0)
0