Fixing w5500.

This commit is contained in:
TXuian 2022-12-10 13:25:39 +08:00
parent 57f690188d
commit cc43254924
1 changed files with 4 additions and 1 deletions

View File

@ -297,7 +297,10 @@ uint32_t wiz_client_op(uint8_t sn, uint8_t *buf, uint32_t buf_size,
if ((size = getSn_RX_RSR(sn)) > 0) { if ((size = getSn_RX_RSR(sn)) > 0) {
if (size > buf_size) size = buf_size; if (size > buf_size) size = buf_size;
ret = wiz_sock_recv(sn, buf, size); ret = wiz_sock_recv(sn, buf, size);
if (ret <= 0) return ret; if (ret <= 0) {
wiz_sock_close(socket_tcp);
return ret;
}
} }
} }
break; break;