Clear disconnected clients from the bottleneck stats api
This commit is contained in:
@@ -37,6 +37,7 @@ namespace network {
|
||||
// from main thread
|
||||
void mainUpdateScreen(rfb::PixelBuffer *pb);
|
||||
void mainUpdateBottleneckStats(const char userid[], const char stats[]);
|
||||
void mainClearBottleneckStats(const char userid[]);
|
||||
void mainUpdateServerFrameStats(uint8_t changedPerc, uint32_t all,
|
||||
uint32_t jpeg, uint32_t webp, uint32_t analysis,
|
||||
uint32_t jpegarea, uint32_t webparea,
|
||||
|
||||
@@ -110,6 +110,15 @@ void GetAPIMessager::mainUpdateBottleneckStats(const char userid[], const char s
|
||||
pthread_mutex_unlock(&statMutex);
|
||||
}
|
||||
|
||||
void GetAPIMessager::mainClearBottleneckStats(const char userid[]) {
|
||||
if (pthread_mutex_trylock(&statMutex))
|
||||
return;
|
||||
|
||||
bottleneckStats.erase(userid);
|
||||
|
||||
pthread_mutex_unlock(&statMutex);
|
||||
}
|
||||
|
||||
void GetAPIMessager::mainUpdateServerFrameStats(uint8_t changedPerc,
|
||||
uint32_t all, uint32_t jpeg, uint32_t webp, uint32_t analysis,
|
||||
uint32_t jpegarea, uint32_t webparea,
|
||||
|
||||
Reference in New Issue
Block a user