Skip to content

Commit 07d5a91

Browse files
committed
Handle Python that's aware of NPN, linked against OpenSSL that's not aware on NPN
1 parent 62090b6 commit 07d5a91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/aapns/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ async def connect(
168168
ssl_context.set_alpn_protocols(["h2"])
169169
try:
170170
ssl_context.set_npn_protocols(["h2"])
171-
except AttributeError:
171+
except (AttributeError, NotImplementedError):
172172
pass
173173
ssl_context.load_cert_chain(client_cert_path)
174174
connector = Connector(

0 commit comments

Comments
 (0)