webclient: Report unexpected connection loss as an explicit error
Otherwise, it can end up with mysterious results in user apps.
This commit is contained in:
parent
eceaeb926a
commit
ebe3b0d302
@ -896,6 +896,13 @@ int webclient_perform(FAR struct webclient_context *ctx)
|
||||
}
|
||||
else if (ws->datend == 0)
|
||||
{
|
||||
if (ws->state != WEBCLIENT_STATE_DATA)
|
||||
{
|
||||
nerr("Connection lost unexpectedly\n");
|
||||
ret = -ECONNABORTED;
|
||||
goto errout_with_errno;
|
||||
}
|
||||
|
||||
ninfo("Connection lost\n");
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user