netutls/dhcpc: treat EINTR as normal errno
A return code of EINTR is perfectly normal, and isn't an error as such. It's an indication that your program may need to do something because a signal occurred, but if not, should re-call recv(). Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
a1ea7f9df7
commit
09dfbdf4c7
@ -765,7 +765,7 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult)
|
|||||||
* of time). Then loop and send the DISCOVER command again.
|
* of time). Then loop and send the DISCOVER command again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
else if (errno != EAGAIN)
|
else if (errno != EAGAIN && errno != EINTR)
|
||||||
{
|
{
|
||||||
/* An error other than a timeout was received -- error out */
|
/* An error other than a timeout was received -- error out */
|
||||||
|
|
||||||
@ -865,7 +865,7 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult)
|
|||||||
* (at most 3 times).
|
* (at most 3 times).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
else if (errno != EAGAIN)
|
else if (errno != EAGAIN && errno != EINTR)
|
||||||
{
|
{
|
||||||
/* An error other than a timeout was received */
|
/* An error other than a timeout was received */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user