File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,17 +94,11 @@ struct WebSocket : AsyncSocket<SSL> {
9494 (us_socket_context_t *) us_socket_context (SSL, (us_socket_t *) this )
9595 );
9696
97- /* If we already reached the max backpressure and started a deferred close, reject all sends */
98- if (webSocketContextData->closeOnBackpressureLimit == 2 ) {
99- return DROPPED;
100- }
101-
10297 /* Skip sending and report success if we are over the limit of maxBackpressure */
10398 if (webSocketContextData->maxBackpressure && webSocketContextData->maxBackpressure < getBufferedAmount ()) {
10499 /* Also defer a close if we should */
105- if (webSocketContextData->closeOnBackpressureLimit == 1 ) {
100+ if (webSocketContextData->closeOnBackpressureLimit ) {
106101 us_socket_shutdown_read (SSL, (us_socket_t *) this );
107- webSocketContextData->closeOnBackpressureLimit = 2 ;
108102 }
109103 return DROPPED;
110104 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ struct WebSocketContextData {
7373
7474 /* There needs to be a maxBackpressure which will force close everything over that limit */
7575 size_t maxBackpressure = 0 ;
76- unsigned char closeOnBackpressureLimit; /* 0, 1 (or 2 internally) */
76+ bool closeOnBackpressureLimit;
7777 bool resetIdleTimeoutOnSend;
7878 bool sendPingsAutomatically;
7979
You can’t perform that action at this time.
0 commit comments