Skip to content

Commit cdfa65f

Browse files
[AtModem] Fix system hang in sim7672 HTTP client send (#1218)
Co-authored-by: Laurent Ellerbach <[email protected]>
1 parent 8d1da98 commit cdfa65f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

devices/AtModem/Http/Sim7672HttpClient.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,12 @@ internal override HttpResponseMessage SendInternal(HttpRequestMessage request)
300300

301301
lengthRead += index;
302302
}
303+
else if (line.Equals("ERROR"))
304+
{
305+
break;
306+
}
303307
}
304-
while ((lengthRead < lengthToRead) || cts.IsCancellationRequested);
308+
while ((lengthRead < lengthToRead) && (!cts.IsCancellationRequested));
305309

306310
// Restart everything
307311
Modem.Channel.Clear();

0 commit comments

Comments
 (0)