Skip to content

Commit

Permalink
Merge pull request #9251 from jepler/fix-udp-raw-socket-connect
Browse files Browse the repository at this point in the history
set the connected status of a socket after UDP & raw connect
  • Loading branch information
dhalbert committed May 22, 2024
2 parents 1382006 + 8acfc0c commit 3418992
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ports/raspberrypi/common-hal/socketpool/Socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,17 @@ void common_hal_socketpool_socket_connect(socketpool_socket_obj_t *socket,
}
case MOD_NETWORK_SOCK_DGRAM: {
err = udp_connect(socket->pcb.udp, &dest, port);
if (err == ERR_OK) {
socket->state = STATE_CONNECTED;
}
break;
}
#if MICROPY_PY_LWIP_SOCK_RAW
case MOD_NETWORK_SOCK_RAW: {
err = raw_connect(socket->pcb.raw, &dest);
if (err == ERR_OK) {
socket->state = STATE_CONNECTED;
}
break;
}
#endif
Expand Down

0 comments on commit 3418992

Please sign in to comment.