Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
193d5d02
Unverified
Commit
193d5d02
authored
Oct 01, 2019
by
望哥
Committed by
GitHub
Oct 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #30 from dubbo-x/issue29
Fix issue29: skip the log output of EOF error
parents
c34c7a71
085aa677
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
.gitignore
.gitignore
+1
-3
.travis.yml
.travis.yml
+4
-2
session.go
session.go
+7
-1
No files found.
.gitignore
View file @
193d5d02
...
...
@@ -19,6 +19,4 @@ classes
# vim
*.swp
# go.sum
# Gopkg.lock
# vendor/
vendor/
.travis.yml
View file @
193d5d02
...
...
@@ -5,7 +5,9 @@ go:
-
"
1.12"
-
"
1.13"
env
:
-
GO111MODULE=on
script
:
-
go fmt ./... && [[ -z `git status -s` ]]
-
GO111MODULE=on && go mod vendor && go test ./... -bench . -race -v
-
go mod vendor && go test ./... -bench . -race -v
session.go
View file @
193d5d02
...
...
@@ -12,6 +12,7 @@ package getty
import
(
"bytes"
"fmt"
"io"
"net"
"runtime"
"sync"
...
...
@@ -524,7 +525,7 @@ func (s *session) handleLoop() {
grNum
:=
atomic
.
AddInt32
(
&
(
s
.
grNum
),
-
1
)
s
.
listener
.
OnClose
(
s
)
log
.
Info
(
"%s, [session.handleLoop] goroutine exit now, left gr num %d"
,
s
.
Stat
(),
grNum
)
log
.
Info
f
(
"%s, [session.handleLoop] goroutine exit now, left gr num %d"
,
s
.
Stat
(),
grNum
)
s
.
gc
()
}()
...
...
@@ -720,6 +721,11 @@ func (s *session) handleTCPPackage() error {
if
netError
,
ok
=
perrors
.
Cause
(
err
)
.
(
net
.
Error
);
ok
&&
netError
.
Timeout
()
{
break
}
if
perrors
.
Cause
(
err
)
==
io
.
EOF
{
err
=
nil
exit
=
true
break
}
log
.
Errorf
(
"%s, [session.conn.read] = error:%+v"
,
s
.
sessionToken
(),
err
)
exit
=
true
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment