Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dbcdc904
authored
7 years ago
by
Iwasaki Yudai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix max connection enforcement
Closes #136.
1 parent
b1e5d958
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
app/app.go
app/app.go
View file @
dbcdc90
...
...
@@ -315,7 +315,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
connections
:=
atomic
.
AddInt64
(
app
.
connections
,
1
)
if
int64
(
app
.
options
.
MaxConnection
)
!=
0
{
if
connections
>
=
int64
(
app
.
options
.
MaxConnection
)
{
if
connections
>
int64
(
app
.
options
.
MaxConnection
)
{
log
.
Printf
(
"Reached max connection: %d"
,
app
.
options
.
MaxConnection
)
return
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment