swap recvfrom_into() port byte-order
This commit is contained in:
parent
22906ac95e
commit
c106b432c5
@ -229,7 +229,7 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t *se
|
||||
|
||||
if (!timed_out) {
|
||||
memcpy((void *)ip, (void *)&source_addr.sin_addr.s_addr, sizeof(source_addr.sin_addr.s_addr));
|
||||
*port = source_addr.sin_port;
|
||||
*port = htons(source_addr.sin_port);
|
||||
} else {
|
||||
mp_raise_OSError(ETIMEDOUT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user