diff --git a/bfs/src/comms/DataSyncThread.cpp b/bfs/src/comms/DataSyncThread.cpp index d1d5d30..1083a8c 100644 --- a/bfs/src/comms/DataSyncThread.cpp +++ b/bfs/src/comms/DataSyncThread.cpp @@ -302,6 +302,9 @@ bool DataSyncThread::areIncomingAttributesAvailable() bool DataSyncThread::sendAttribute(Attribute attrib) { + if (!threadRunning) + return true; + // two extra bytes, one for command 0x00 and one for length: int streamLength = attrib.getLength() + ATTRIB_KEY_SIZE + 2; char *bytes = new char[streamLength];