good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit cfde4a5e authored by Jacob's avatar Jacob
Browse files

Use Int64 instead of Int32 for counting pings

parent afe94af9
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment