diff --git a/client.go b/client.go index 11ac525..b6d2d8d 100644 --- a/client.go +++ b/client.go @@ -79,6 +79,11 @@ func (cli *Client) reconnect(sess *Session) { for cli.needReconnect(sess) && policy.Retry() { if s, err := cli.Dial(addr.Network(), addr.String()); err == nil { + s.data = sess.data + s.id = sess.id + s.user = sess.user + s.lastPackTs = sess.lastPackTs + s.requests = sess.requests *sess = *s // replace old session return }