Add closeOnBackpressureLimit option

This commit is contained in:
Alex Hultman
2021-01-26 12:18:31 +01:00
parent 359c26b0bf
commit 12d8b192a1
4 changed files with 13 additions and 1 deletions
+4
View File
@@ -64,6 +64,10 @@ public:
/* Skip sending and report success if we are over the limit of maxBackpressure */
if (webSocketContextData->maxBackpressure && webSocketContextData->maxBackpressure < getBufferedAmount()) {
/* Also defer a close if we should */
if (webSocketContextData->closeOnBackpressureLimit) {
us_socket_shutdown_read(SSL, (us_socket_t *) this);
}
return true;
}