Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
7c65a929
Commit
7c65a929
authored
4 years ago
by
cvictory
Browse files
Options
Downloads
Patches
Plain Diff
add some log
parent
1198c440
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
remoting/getty/getty_client.go
+1
-0
1 addition, 0 deletions
remoting/getty/getty_client.go
remoting/getty/listener.go
+2
-0
2 additions, 0 deletions
remoting/getty/listener.go
with
3 additions
and
0 deletions
remoting/getty/getty_client.go
+
1
−
0
View file @
7c65a929
...
...
@@ -182,6 +182,7 @@ func (c *Client) Request(request *remoting.Request, timeout time.Duration, respo
)
if
totalLen
,
sendLen
,
err
=
c
.
transfer
(
session
,
request
,
timeout
);
err
!=
nil
{
if
sendLen
!=
0
&&
totalLen
!=
sendLen
{
logger
.
Warnf
(
"start to close the session at request because %d of %d bytes data is sent success. err:%+v"
,
sendLen
,
totalLen
,
err
)
go
c
.
Close
()
}
return
perrors
.
WithStack
(
err
)
...
...
This diff is collapsed.
Click to expand it.
remoting/getty/listener.go
+
2
−
0
View file @
7c65a929
...
...
@@ -357,6 +357,7 @@ func (h *RpcServerHandler) OnCron(session getty.Session) {
func
reply
(
session
getty
.
Session
,
resp
*
remoting
.
Response
)
{
if
totalLen
,
sendLen
,
err
:=
session
.
WritePkg
(
resp
,
WritePkg_Timeout
);
err
!=
nil
{
if
sendLen
!=
0
&&
totalLen
!=
sendLen
{
logger
.
Warnf
(
"start to close the session at replying because %d of %d bytes data is sent success. err:%+v"
,
sendLen
,
totalLen
,
err
)
go
session
.
Close
()
}
logger
.
Errorf
(
"WritePkg error: %#v, %#v"
,
perrors
.
WithStack
(
err
),
resp
)
...
...
@@ -371,6 +372,7 @@ func heartbeat(session getty.Session, timeout time.Duration, callBack func(err e
remoting
.
AddPendingResponse
(
resp
)
totalLen
,
sendLen
,
err
:=
session
.
WritePkg
(
req
,
3
*
time
.
Second
)
if
sendLen
!=
0
&&
totalLen
!=
sendLen
{
logger
.
Warnf
(
"start to close the session at heartbeat because %d of %d bytes data is sent success. err:%+v"
,
sendLen
,
totalLen
,
err
)
go
session
.
Close
()
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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