good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
nhooyr
websocket
Commits
cfde4a5e
Unverified
Commit
cfde4a5e
authored
Apr 11, 2024
by
Jacob
Browse files
Options
Downloads
Patches
Plain Diff
Use Int64 instead of Int32 for counting pings
parent
afe94af9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
conn.go
+2
-2
2 additions, 2 deletions
conn.go
with
2 additions
and
2 deletions
conn.go
+
2
−
2
View file @
cfde4a5e
...
...
@@ -77,7 +77,7 @@ type Conn struct {
closeMu
sync
.
Mutex
closing
bool
pingCounter
atomic
.
Int
32
pingCounter
atomic
.
Int
64
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
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment