File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ void TCPSOCKET_SEND_TIMEOUT()
33
33
TEST_FAIL ();
34
34
return ;
35
35
}
36
+ sock.set_blocking (false );
36
37
37
38
int err;
38
39
Timer timer;
@@ -42,7 +43,7 @@ void TCPSOCKET_SEND_TIMEOUT()
42
43
timer.start ();
43
44
err = sock.send (tx_buffer, sizeof (tx_buffer));
44
45
timer.stop ();
45
- if ((err == sizeof (tx_buffer)) &&
46
+ if ((err == sizeof (tx_buffer) || err == NSAPI_ERROR_WOULD_BLOCK ) &&
46
47
(timer.read_ms () <= 800 )) {
47
48
continue ;
48
49
}
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ void TLSSOCKET_SEND_TIMEOUT()
34
34
TEST_FAIL ();
35
35
return ;
36
36
}
37
+ sock.set_blocking (false );
37
38
38
39
int err;
39
40
Timer timer;
@@ -43,7 +44,7 @@ void TLSSOCKET_SEND_TIMEOUT()
43
44
timer.start ();
44
45
err = sock.send (tx_buffer, sizeof (tx_buffer));
45
46
timer.stop ();
46
- if ((err == sizeof (tx_buffer)) &&
47
+ if ((err == sizeof (tx_buffer) || err == NSAPI_ERROR_WOULD_BLOCK ) &&
47
48
(timer.read_ms () <= 800 )) {
48
49
continue ;
49
50
}
You can’t perform that action at this time.
0 commit comments