From 7cc1c9c669d545166541189089117e629072ed8b Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 22 May 2023 14:45:40 +0200 Subject: [PATCH] Set reconnecting status when recreating session --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index b7b79efe..58f5b53c 100644 --- a/client.go +++ b/client.go @@ -385,6 +385,8 @@ func (c *Client) monitor(ctx context.Context) { // This only works if the session is still open on the server // otherwise recreate it + c.setState(Reconnecting) + s := c.Session() if s == nil { dlog.Printf("no session to restore") @@ -414,6 +416,7 @@ func (c *Client) monitor(ctx context.Context) { case recreateSession: dlog.Printf("action: recreateSession") + c.setState(Reconnecting) // create a new session to replace the previous one dlog.Printf("trying to recreate session")