mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-26 17:41:58 -06:00
Added more logging to agent.
This commit is contained in:
@@ -2994,6 +2994,10 @@ async def connect_loop():
|
|||||||
detail = f"{detail}; connection_error={conn_err!r}"
|
detail = f"{detail}; connection_error={conn_err!r}"
|
||||||
|
|
||||||
tls_error = False
|
tls_error = False
|
||||||
|
_log_agent(
|
||||||
|
f"connect_loop attempt={attempt} raw failure detail={detail}",
|
||||||
|
fname="agent.error.log",
|
||||||
|
)
|
||||||
for exc in _iter_exception_chain(e):
|
for exc in _iter_exception_chain(e):
|
||||||
if isinstance(exc, aiohttp.client_exceptions.ClientConnectorCertificateError):
|
if isinstance(exc, aiohttp.client_exceptions.ClientConnectorCertificateError):
|
||||||
tls_error = True
|
tls_error = True
|
||||||
@@ -3014,6 +3018,11 @@ async def connect_loop():
|
|||||||
break
|
break
|
||||||
|
|
||||||
if tls_error:
|
if tls_error:
|
||||||
|
_log_agent(
|
||||||
|
f"connect_loop attempt={attempt} TLS failure detected detail={detail}",
|
||||||
|
fname="agent.error.log",
|
||||||
|
)
|
||||||
|
_log_exception_trace(f"connect_loop attempt={attempt} TLS failure")
|
||||||
if client.refresh_pinned_certificate():
|
if client.refresh_pinned_certificate():
|
||||||
_log_agent(
|
_log_agent(
|
||||||
f"connect_loop attempt={attempt} refreshed server certificate after TLS failure; retrying immediately",
|
f"connect_loop attempt={attempt} refreshed server certificate after TLS failure; retrying immediately",
|
||||||
|
|||||||
Reference in New Issue
Block a user