Skip to content

Commit fea4ee8

Browse files
[AtModem] Fix NullReferenceException in AtChannel.ReaderLoopAsync (#1216)
Co-authored-by: Laurent Ellerbach <[email protected]>
1 parent e6aeaea commit fea4ee8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

devices/AtModem/AtParser/AtChannel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ public AtResponse SendFullCommand(AtCommand command, CancellationToken cancellat
335335
}
336336
finally
337337
{
338-
_currentCommand = default;
339-
_currentResponse = default;
338+
lock (_lock)
339+
{
340+
_currentCommand = default;
341+
_currentResponse = default;
342+
}
340343
}
341344
}
342345

0 commit comments

Comments
 (0)