mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
websocket: actively cancel lws_service() / poll() when new data is to be sent
This commit is contained in:
parent
5c2fbad0b1
commit
82f911bf0c
1 changed files with 2 additions and 1 deletions
|
@ -164,7 +164,7 @@ void Web::worker()
|
|||
logger->info("Started worker");
|
||||
|
||||
while (running) {
|
||||
lws_service(context, 10);
|
||||
lws_service(context, 0);
|
||||
|
||||
while (!writables.empty()) {
|
||||
wsi = writables.pop();
|
||||
|
@ -291,4 +291,5 @@ void Web::stop()
|
|||
void Web::callbackOnWritable(lws *wsi)
|
||||
{
|
||||
writables.push(wsi);
|
||||
lws_cancel_service(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue