Skip to content

Commit f218f53

Browse files
committed
Run ssl.create_default_context in a thread
1 parent 7d0e48c commit f218f53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nanokvm/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def async_fetch_remote_fingerprint(
7171
hostname = parsed_url.hostname
7272
port = parsed_url.port or 443
7373

74-
ssl_ctx = ssl.create_default_context()
74+
ssl_ctx = await asyncio.to_thread(ssl.create_default_context)
7575
ssl_ctx.check_hostname = False
7676
ssl_ctx.verify_mode = ssl.CERT_NONE
7777

0 commit comments

Comments
 (0)