mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix: only send data once to the client
This commit is contained in:
parent
8a578325c3
commit
79fa624c3e
1 changed files with 5 additions and 1 deletions
|
@ -248,7 +248,7 @@ found: * (void **) user = n;
|
|||
if (w->shutdown)
|
||||
goto shutdown;
|
||||
|
||||
if (!w->write.pool)
|
||||
if (w->write.pool == NULL || w->write.cnt == 0)
|
||||
return 0; /* no samples available to send */
|
||||
|
||||
pthread_mutex_lock(&w->write.mutex);
|
||||
|
@ -274,6 +274,10 @@ found: * (void **) user = n;
|
|||
|
||||
memcpy(dst, src, bytes);
|
||||
}
|
||||
|
||||
/* We've done our work here. Do not send again.. */
|
||||
w->write.pool = NULL;
|
||||
w->write.pool = 0;
|
||||
|
||||
pthread_mutex_unlock(&w->write.mutex);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue