Skip to content

Commit

Permalink
Adding check to data sync thread send to make sure thread is running …
Browse files Browse the repository at this point in the history
…before attempting to send
  • Loading branch information
grf14003 committed May 8, 2020
1 parent fadc4b2 commit 408745a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bfs/src/comms/DataSyncThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ bool DataSyncThread::areIncomingAttributesAvailable()

bool DataSyncThread::sendAttribute(Attribute attrib)
{
if (!threadRunning)
return;

// two extra bytes, one for command 0x00 and one for length:
int streamLength = attrib.getLength() + ATTRIB_KEY_SIZE + 2;
char *bytes = new char[streamLength];
Expand Down

0 comments on commit 408745a

Please sign in to comment.