Skip to content

Commit

Permalink
Merge pull request #4465 from anecdata/udp_server
Browse files Browse the repository at this point in the history
swap recvfrom_into() port byte-order
  • Loading branch information
hierophect authored Mar 23, 2021
2 parents 98425c9 + c106b43 commit 278d53c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/esp32s2/common-hal/socketpool/Socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 278d53c

Please sign in to comment.