Skip to content

Commit 4a2a6a3

Browse files
committed
only enable http2 on async transport if h2 is there
1 parent ad2ceae commit 4a2a6a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry_sdk/transport.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,9 @@ def flush( # type: ignore[override]
949949

950950
def _get_pool_options(self: "Self") -> "Dict[str, Any]":
951951
return self._get_httpcore_pool_options(
952-
http2=self.parsed_dsn is not None and self.parsed_dsn.scheme == "https"
952+
http2=HTTP2_ENABLED
953+
and self.parsed_dsn is not None
954+
and self.parsed_dsn.scheme == "https"
953955
)
954956

955957
def _make_pool(

0 commit comments

Comments
 (0)