Skip to content

Commit 241273f

Browse files
authored
Add timeout to PerformSyncRequest (#321)
***NO_CI***
1 parent 20efcd3 commit 241273f

File tree

1 file changed

+5
-1
lines changed
  • nanoFramework.Tools.DebugLibrary.Shared/WireProtocol

1 file changed

+5
-1
lines changed

nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,11 @@ private IncomingMessage PerformSyncRequest(uint command, uint flags, object payl
652652
{
653653
if (request != null)
654654
{
655-
Task.WaitAll(request);
655+
if(!Task.WaitAll(new Task[] { request }, timeout))
656+
{
657+
// wait timed out
658+
return null;
659+
}
656660
}
657661
else
658662
{

0 commit comments

Comments
 (0)