From cfde4a5ebfd40869983e926c9098e12f82761740 Mon Sep 17 00:00:00 2001
From: Jacob <jacalz@tutanota.com>
Date: Thu, 11 Apr 2024 10:35:07 +0200
Subject: [PATCH] Use Int64 instead of Int32 for counting pings

---
 conn.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conn.go b/conn.go
index 48bc510..d7434a9 100644
--- a/conn.go
+++ b/conn.go
@@ -77,7 +77,7 @@ type Conn struct {
 	closeMu sync.Mutex
 	closing bool
 
-	pingCounter   atomic.Int32
+	pingCounter   atomic.Int64
 	activePingsMu sync.Mutex
 	activePings   map[string]chan<- struct{}
 }
@@ -202,7 +202,7 @@ func (c *Conn) flate() bool {
 func (c *Conn) Ping(ctx context.Context) error {
 	p := c.pingCounter.Add(1)
 
-	err := c.ping(ctx, strconv.Itoa(int(p)))
+	err := c.ping(ctx, strconv.FormatInt(p, 10))
 	if err != nil {
 		return fmt.Errorf("failed to ping: %w", err)
 	}
-- 
GitLab