Skip to content

Commit ad2ceae

Browse files
committed
turn keep alive on by default in httpcore based transports
looks like we were doing this before, so removing it would be a regression
1 parent ed040a1 commit ad2ceae

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

sentry_sdk/transport.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,14 +550,13 @@ def _get_httpcore_pool_options(
550550
if self.options["socket_options"] is not None:
551551
socket_options = self.options["socket_options"]
552552

553-
if self.options["keep_alive"]:
554-
if socket_options is None:
555-
socket_options = []
553+
if socket_options is None:
554+
socket_options = []
556555

557-
used_options = {(o[0], o[1]) for o in socket_options}
558-
for default_option in KEEP_ALIVE_SOCKET_OPTIONS:
559-
if (default_option[0], default_option[1]) not in used_options:
560-
socket_options.append(default_option)
556+
used_options = {(o[0], o[1]) for o in socket_options}
557+
for default_option in KEEP_ALIVE_SOCKET_OPTIONS:
558+
if (default_option[0], default_option[1]) not in used_options:
559+
socket_options.append(default_option)
561560

562561
if socket_options is not None:
563562
options["socket_options"] = socket_options

0 commit comments

Comments
 (0)