Skip to content
Snippets Groups Projects
Commit 4e27d9fc authored by Josh Brooks's avatar Josh Brooks
Browse files

Add debug

parent d853a44a
No related branches found
No related tags found
2 merge requests!510Release,!398Add debug log for file transfer not quitting
......@@ -62,7 +62,9 @@ func (m *manager) startSendingWorkerPool(multiStop *stoppable.Multi) {
for i := 0; i < workerPoolThreads; 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())
multiStop.Add(stop)
}
......@@ -83,9 +85,12 @@ func (m *manager) sendingThread(stop *stoppable.Single) {
return
case healthy := <-healthChan:
for !healthy {
jww.INFO.Printf("not healthy, waiting for health update")
healthy = <-healthChan
jww.INFO.Printf("received health update, it is now set to %s", healthy)
}
case packet := <-m.sendQueue:
jww.INFO.Printf("sending packet")
m.sendCmix(packet)
}
}
......
......@@ -90,6 +90,7 @@ func (s *Single) ToStopped() {
// Quit returns a receive-only channel that will be triggered when the Stoppable
// quits.
func (s *Single) Quit() <-chan struct{} {
jww.INFO.Printf("Quit for %s", s.name)
return s.quit
}
......@@ -110,6 +111,10 @@ func (s *Single) Close() error {
// Send on quit channel
s.quit <- struct{}{}
jww.INFO.Printf("Sent to quit channel for single stoppable %q.",
s.Name())
})
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment