mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Applied patch from Dustin Spicuzza to fix robot hang
Change-Id: I273feafcad5c95de04a11bab64c2d5596f248662
This commit is contained in:
committed by
Brad Miller
parent
130319b771
commit
048b02e6cd
@@ -97,10 +97,17 @@ void WriteManager::run() {
|
||||
entry = ((std::queue<NetworkTableEntry*>*)outgoingAssignmentQueue)->front();
|
||||
((std::queue<NetworkTableEntry*>*)outgoingAssignmentQueue)->pop();
|
||||
{
|
||||
NTSynchronized sync(entryStore.LOCK);
|
||||
entry->MakeClean();
|
||||
wrote = true;
|
||||
receiver.offerOutgoingAssignment(entry);
|
||||
NetworkTableEntry * entryCopy;
|
||||
|
||||
{
|
||||
NTSynchronized sync(entryStore.LOCK);
|
||||
entry->MakeClean();
|
||||
wrote = true;
|
||||
entryCopy = new NetworkTableEntry(*entry);
|
||||
}
|
||||
|
||||
receiver.offerOutgoingAssignment(entryCopy);
|
||||
delete entryCopy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,10 +115,17 @@ void WriteManager::run() {
|
||||
entry = ((std::queue<NetworkTableEntry*>*)outgoingUpdateQueue)->front();
|
||||
((std::queue<NetworkTableEntry*>*)outgoingUpdateQueue)->pop();
|
||||
{
|
||||
NTSynchronized sync(entryStore.LOCK);
|
||||
entry->MakeClean();
|
||||
wrote = true;
|
||||
receiver.offerOutgoingUpdate(entry);
|
||||
NetworkTableEntry * entryCopy;
|
||||
|
||||
{
|
||||
NTSynchronized sync(entryStore.LOCK);
|
||||
entry->MakeClean();
|
||||
wrote = true;
|
||||
entryCopy = new NetworkTableEntry(*entry);
|
||||
}
|
||||
|
||||
receiver.offerOutgoingUpdate(entryCopy);
|
||||
delete entryCopy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user