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
ea6ff4c5
Commit
ea6ff4c5
authored
Mar 29, 2018
by
AlexStocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
juju/errors instead of pkg/errors
parent
1998bbf8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
change_log.md
change_log.md
+6
-2
server.go
server.go
+1
-1
session.go
session.go
+3
-3
No files found.
change_log.md
View file @
ea6ff4c5
...
...
@@ -14,11 +14,15 @@
## develop history ##
---
-
2018/03/18
-
2018/03/29
> improvement
*
use juju/errors instead of pkg/errors
-
2018/03/20
> bug fix
*
ignore connectPingPackage
-
2018/03/1
8
-
2018/03/1
9
> improvement
*
use gxnet.IsSameAddr
*
send out pkg asap in WritePkg when the second parameter @timeout is not greater then 0.
...
...
server.go
View file @
ea6ff4c5
...
...
@@ -27,7 +27,7 @@ import (
"github.com/AlexStocks/goext/time"
log
"github.com/AlexStocks/log4go"
"github.com/gorilla/websocket"
"github.com/
pkg
/errors"
"github.com/
juju
/errors"
)
var
(
...
...
session.go
View file @
ea6ff4c5
...
...
@@ -26,7 +26,7 @@ import (
"github.com/AlexStocks/goext/time"
log
"github.com/AlexStocks/log4go"
"github.com/gorilla/websocket"
"github.com/
pkg
/errors"
"github.com/
juju
/errors"
)
const
(
...
...
@@ -342,7 +342,7 @@ func (s *session) WriteBytes(pkg []byte) error {
// s.conn.SetWriteTimeout(time.Now().Add(s.wTimeout))
if
_
,
err
:=
s
.
Connection
.
Write
(
pkg
);
err
!=
nil
{
return
errors
.
Wrap
f
(
err
,
"s.Connection.Write(pkg len:%d)"
,
len
(
pkg
))
return
errors
.
Annotate
f
(
err
,
"s.Connection.Write(pkg len:%d)"
,
len
(
pkg
))
}
s
.
incWritePkgNum
()
...
...
@@ -673,7 +673,7 @@ func (s *session) handleUDPPackage() error {
}
if
err
!=
nil
{
log
.
Error
(
"%s, [session.handleUDPPackage] = len{%d}, error{%s}"
,
s
.
sessionToken
(),
bufLen
,
err
)
err
=
errors
.
Wrap
f
(
err
,
"conn.read()"
)
err
=
errors
.
Annotate
f
(
err
,
"conn.read()"
)
break
}
...
...
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