Revert "closeOnBackpressure should block all further sending"

This reverts commit d4ffeadd88.
This commit is contained in:
Alex Hultman
2022-11-06 06:23:44 +01:00
parent d4ffeadd88
commit 7a363a8b10
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -94,17 +94,11 @@ public:
(us_socket_context_t *) us_socket_context(SSL, (us_socket_t *) this) (us_socket_context_t *) us_socket_context(SSL, (us_socket_t *) this)
); );
/* If we already reached the max backpressure and started a deferred close, reject all sends */
if (webSocketContextData->closeOnBackpressureLimit == 2) {
return DROPPED;
}
/* Skip sending and report success if we are over the limit of maxBackpressure */ /* Skip sending and report success if we are over the limit of maxBackpressure */
if (webSocketContextData->maxBackpressure && webSocketContextData->maxBackpressure < getBufferedAmount()) { if (webSocketContextData->maxBackpressure && webSocketContextData->maxBackpressure < getBufferedAmount()) {
/* Also defer a close if we should */ /* Also defer a close if we should */
if (webSocketContextData->closeOnBackpressureLimit == 1) { if (webSocketContextData->closeOnBackpressureLimit) {
us_socket_shutdown_read(SSL, (us_socket_t *) this); us_socket_shutdown_read(SSL, (us_socket_t *) this);
webSocketContextData->closeOnBackpressureLimit = 2;
} }
return DROPPED; return DROPPED;
} }
+1 -1
View File
@@ -73,7 +73,7 @@ public:
/* There needs to be a maxBackpressure which will force close everything over that limit */ /* There needs to be a maxBackpressure which will force close everything over that limit */
size_t maxBackpressure = 0; size_t maxBackpressure = 0;
unsigned char closeOnBackpressureLimit; /* 0, 1 (or 2 internally) */ bool closeOnBackpressureLimit;
bool resetIdleTimeoutOnSend; bool resetIdleTimeoutOnSend;
bool sendPingsAutomatically; bool sendPingsAutomatically;