diff --git a/conn.go b/conn.go
index 48bc510a464cb77292051020f1db500892d34047..d7434a9d55cf94008bc87dfbe00f66720230c326 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)
 	}