mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
Merge branch 'bugfix/tw16355' into 'master'
fix(tw16355): examples/protocols/coap_client(server) See merge request !1531
This commit is contained in:
@ -139,7 +139,7 @@ static void coap_example_task(void *p)
|
|||||||
FD_ZERO(&readfds);
|
FD_ZERO(&readfds);
|
||||||
FD_CLR( ctx->sockfd, &readfds );
|
FD_CLR( ctx->sockfd, &readfds );
|
||||||
FD_SET( ctx->sockfd, &readfds );
|
FD_SET( ctx->sockfd, &readfds );
|
||||||
result = select( FD_SETSIZE, &readfds, 0, 0, &tv );
|
result = select( ctx->sockfd+1, &readfds, 0, 0, &tv );
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
if (FD_ISSET( ctx->sockfd, &readfds ))
|
if (FD_ISSET( ctx->sockfd, &readfds ))
|
||||||
coap_read(ctx);
|
coap_read(ctx);
|
||||||
|
@ -120,7 +120,7 @@ static void coap_example_thread(void *p)
|
|||||||
FD_CLR( ctx->sockfd, &readfds);
|
FD_CLR( ctx->sockfd, &readfds);
|
||||||
FD_SET( ctx->sockfd, &readfds);
|
FD_SET( ctx->sockfd, &readfds);
|
||||||
|
|
||||||
int result = select( FD_SETSIZE, &readfds, 0, 0, &tv );
|
int result = select( ctx->sockfd+1, &readfds, 0, 0, &tv );
|
||||||
if (result > 0){
|
if (result > 0){
|
||||||
if (FD_ISSET( ctx->sockfd, &readfds ))
|
if (FD_ISSET( ctx->sockfd, &readfds ))
|
||||||
coap_read(ctx);
|
coap_read(ctx);
|
||||||
|
Reference in New Issue
Block a user