Skip to content

Commit f9912d4

Browse files
Update log.warning message in Futures WS client
1 parent ed125dc commit f9912d4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/kraken/futures/websocket/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,20 @@ async def __reconnect(self: ConnectFuturesWebsocket) -> None:
214214
self.state = WSState.ERRORHANDLING
215215
exception_occur = True
216216
self.__challenge_ready = False
217-
message = f"{task} got an exception {task.exception()}\n {task.get_stack()}"
218-
LOG.warning(message)
217+
LOG.warning(
218+
"%s got an exception %s:\n%s\n"
219+
"The connection will be recovered in the background.",
220+
task,
221+
task.exception(),
222+
task.get_stack(),
223+
)
219224
for process in pending:
220225
LOG.warning("Pending %s", process)
221226
try:
222227
process.cancel()
223228
LOG.warning("Cancelled %s", process)
224229
except asyncio.CancelledError:
225230
LOG.error("Failed to cancel %s", process)
226-
await self.__callback({"python-kraken-sdk": {"error": message}})
227231
if exception_occur:
228232
break
229233
self.state = WSState.CLOSED

0 commit comments

Comments
 (0)