Skip to content

Commit 45bdffe

Browse files
[AtModem] Fix NullReferenceException in AtChannel.ProcessMessage (#1221)
Co-authored-by: Laurent Ellerbach <[email protected]>
1 parent 949edd5 commit 45bdffe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

devices/AtModem/AtParser/AtChannel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,11 @@ private void ReaderLoopAsync()
409409
}
410410
else
411411
{
412-
ProcessMessage(line1);
412+
// lock access to _currentCommand & _currentResponse
413+
lock (_lock)
414+
{
415+
ProcessMessage(line1);
416+
}
413417
}
414418
}
415419
}

0 commit comments

Comments
 (0)