summaryrefslogtreecommitdiff
path: root/src/waitress/adjustments.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/waitress/adjustments.py')
-rw-r--r--src/waitress/adjustments.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/waitress/adjustments.py b/src/waitress/adjustments.py
index 45ac41b..42d2bc0 100644
--- a/src/waitress/adjustments.py
+++ b/src/waitress/adjustments.py
@@ -135,6 +135,7 @@ class Adjustments:
("unix_socket", str),
("unix_socket_perms", asoctal),
("sockets", as_socket_list),
+ ("channel_request_lookahead", int),
)
_param_map = dict(_params)
@@ -280,6 +281,13 @@ class Adjustments:
# be used for e.g. socket activation
sockets = []
+ # By setting this to a value larger than zero, each channel stays readable
+ # and continues to read requests from the client even if a request is still
+ # running, until the number of buffered requests exceeds this value.
+ # This allows detecting if a client closed the connection while its request
+ # is being processed.
+ channel_request_lookahead = 0
+
def __init__(self, **kw):
if "listen" in kw and ("host" in kw or "port" in kw):