Fix local_nonce None

This commit is contained in:
Steven B 2024-12-13 15:16:59 +00:00
parent 6bfb19a748
commit aba71744ca
No known key found for this signature in database
GPG Key ID: 6D5B46B3679F2A43

View File

@ -8,7 +8,6 @@ import hashlib
import logging
import secrets
import ssl
import uuid
from enum import Enum, auto
from typing import TYPE_CHECKING, Any, cast
@ -492,8 +491,8 @@ class SslAesTransport(BaseTransport):
async def perform_handshake1(self) -> tuple[str, str, str] | None:
"""Perform the handshake1."""
resp_dict = None
if self._username:
local_nonce = secrets.token_bytes(8).hex().upper()
if self._username:
resp_dict = await self.try_send_handshake1(self._username, local_nonce)
if (