Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
4e27d9fc
Commit
4e27d9fc
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add debug
parent
d853a44a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!510
Release
,
!398
Add debug log for file transfer not quitting
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fileTransfer/send.go
+6
-1
6 additions, 1 deletion
fileTransfer/send.go
stoppable/single.go
+5
-0
5 additions, 0 deletions
stoppable/single.go
with
11 additions
and
1 deletion
fileTransfer/send.go
+
6
−
1
View file @
4e27d9fc
...
@@ -62,7 +62,9 @@ func (m *manager) startSendingWorkerPool(multiStop *stoppable.Multi) {
...
@@ -62,7 +62,9 @@ func (m *manager) startSendingWorkerPool(multiStop *stoppable.Multi) {
for
i
:=
0
;
i
<
workerPoolThreads
;
i
++
{
for
i
:=
0
;
i
<
workerPoolThreads
;
i
++
{
stop
:=
stoppable
.
NewSingle
(
sendThreadStoppableName
+
strconv
.
Itoa
(
i
))
stop
:=
stoppable
.
NewSingle
(
sendThreadStoppableName
+
strconv
.
Itoa
(
i
))
go
m
.
sendingThread
(
stop
)
go
func
(
single
*
stoppable
.
Single
)
{
m
.
sendingThread
(
single
)
}(
stop
)
jww
.
INFO
.
Printf
(
"Adding stoppable %s"
,
stop
.
Name
())
jww
.
INFO
.
Printf
(
"Adding stoppable %s"
,
stop
.
Name
())
multiStop
.
Add
(
stop
)
multiStop
.
Add
(
stop
)
}
}
...
@@ -83,9 +85,12 @@ func (m *manager) sendingThread(stop *stoppable.Single) {
...
@@ -83,9 +85,12 @@ func (m *manager) sendingThread(stop *stoppable.Single) {
return
return
case
healthy
:=
<-
healthChan
:
case
healthy
:=
<-
healthChan
:
for
!
healthy
{
for
!
healthy
{
jww
.
INFO
.
Printf
(
"not healthy, waiting for health update"
)
healthy
=
<-
healthChan
healthy
=
<-
healthChan
jww
.
INFO
.
Printf
(
"received health update, it is now set to %s"
,
healthy
)
}
}
case
packet
:=
<-
m
.
sendQueue
:
case
packet
:=
<-
m
.
sendQueue
:
jww
.
INFO
.
Printf
(
"sending packet"
)
m
.
sendCmix
(
packet
)
m
.
sendCmix
(
packet
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
stoppable/single.go
+
5
−
0
View file @
4e27d9fc
...
@@ -90,6 +90,7 @@ func (s *Single) ToStopped() {
...
@@ -90,6 +90,7 @@ func (s *Single) ToStopped() {
// Quit returns a receive-only channel that will be triggered when the Stoppable
// Quit returns a receive-only channel that will be triggered when the Stoppable
// quits.
// quits.
func
(
s
*
Single
)
Quit
()
<-
chan
struct
{}
{
func
(
s
*
Single
)
Quit
()
<-
chan
struct
{}
{
jww
.
INFO
.
Printf
(
"Quit for %s"
,
s
.
name
)
return
s
.
quit
return
s
.
quit
}
}
...
@@ -110,6 +111,10 @@ func (s *Single) Close() error {
...
@@ -110,6 +111,10 @@ func (s *Single) Close() error {
// Send on quit channel
// Send on quit channel
s
.
quit
<-
struct
{}{}
s
.
quit
<-
struct
{}{}
jww
.
INFO
.
Printf
(
"Sent to quit channel for single stoppable %q."
,
s
.
Name
())
})
})
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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