From 45d449aceaf302f27a2e09b3056f0fd9c4b1ff1c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 18 Jan 2022 09:26:54 +0400 Subject: [PATCH] document possible deadlocks in AllowConnectionWindowIncrease --- interface.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface.go b/interface.go index af846dc22..6381e9edd 100644 --- a/interface.go +++ b/interface.go @@ -270,6 +270,8 @@ type Config struct { // to increase the connection flow control window. // If set, the caller can prevent an increase of the window. Typically, it would do so to // limit the memory usage. + // To avoid deadlocks, it is not valid to call other functions on the session or on streams + // in this callback. AllowConnectionWindowIncrease func(sess Session, delta uint64) bool // MaxIncomingStreams is the maximum number of concurrent bidirectional streams that a peer is allowed to open. // Values above 2^60 are invalid.