Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe94af commit cfde4a5Copy full SHA for cfde4a5
conn.go
@@ -77,7 +77,7 @@ type Conn struct {
77
closeMu sync.Mutex
78
closing bool
79
80
- pingCounter atomic.Int32
+ pingCounter atomic.Int64
81
activePingsMu sync.Mutex
82
activePings map[string]chan<- struct{}
83
}
@@ -202,7 +202,7 @@ func (c *Conn) flate() bool {
202
func (c *Conn) Ping(ctx context.Context) error {
203
p := c.pingCounter.Add(1)
204
205
- err := c.ping(ctx, strconv.Itoa(int(p)))
+ err := c.ping(ctx, strconv.FormatInt(p, 10))
206
if err != nil {
207
return fmt.Errorf("failed to ping: %w", err)
208
0 commit comments