@@ -630,7 +630,7 @@ async def _connect_addr(
630
630
before = time .monotonic ()
631
631
try :
632
632
return await __connect_addr (params , timeout , True , * args )
633
- except _Retry :
633
+ except _RetryConnectSignal :
634
634
pass
635
635
636
636
# second attempt
@@ -641,7 +641,7 @@ async def _connect_addr(
641
641
return await __connect_addr (params_retry , timeout , False , * args )
642
642
643
643
644
- class _Retry (Exception ):
644
+ class _RetryConnectSignal (Exception ):
645
645
pass
646
646
647
647
@@ -687,7 +687,7 @@ async def __connect_addr(
687
687
tr .close ()
688
688
689
689
# retry=True here is a redundant check because we don't want to
690
- # accidentally raise the internal _Retry to the outer world
690
+ # accidentally raise the internal _RetryConnectSignal to the user
691
691
if retry and (
692
692
params .sslmode == SSLMode .allow and not pr .is_ssl or
693
693
params .sslmode == SSLMode .prefer and pr .is_ssl
@@ -697,7 +697,7 @@ async def __connect_addr(
697
697
# 2. First attempt with sslmode=prefer, ssl=ctx failed while the
698
698
# server claimed to support SSL (returning "S" for SSLRequest)
699
699
# (likely because pg_hba.conf rejected the connection)
700
- raise _Retry ()
700
+ raise _RetryConnectSignal ()
701
701
702
702
else :
703
703
# but will NOT retry if:
0 commit comments