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

Try some more debugs

parent 6e88a678
Branches
Tags
2 merge requests!510Release,!398Add debug log for file transfer not quitting
...@@ -215,20 +215,25 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) { ...@@ -215,20 +215,25 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) {
// StartProcesses starts the sending threads. Adheres to the xxdk.Service type. // StartProcesses starts the sending threads. Adheres to the xxdk.Service type.
func (m *manager) StartProcesses() (stoppable.Stoppable, error) { func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
// Construct stoppables // Construct stoppables
multiStoppable := stoppable.NewMulti(fileTransferStoppable) sendStoppable := stoppable.NewMulti(sendThreadStoppableName)
batchBuilderStop := stoppable.NewSingle(batchBuilderThreadStoppable) batchBuilderStop := stoppable.NewSingle(batchBuilderThreadStoppable)
// Start sending threads // Start sending threads
go m.batchBuilderThread(batchBuilderStop)
// Note that the startSendingWorkerPool already creates thread for every // Note that the startSendingWorkerPool already creates thread for every
// worker. As a result, there is no need to run it asynchronously. In fact, // worker. As a result, there is no need to run it asynchronously. In fact,
// running this asynchronously could result in a race condition where // running this asynchronously could result in a race condition where
// some worker threads are not added to senderPoolStop before that stoppable // some worker threads are not added to senderPoolStop before that stoppable
// is added to the multiStoppable. // is added to the multiStoppable.
m.startSendingWorkerPool(multiStoppable) m.startSendingWorkerPool(sendStoppable)
go m.batchBuilderThread(batchBuilderStop) jww.INFO.Printf("STOPPING FT THREAD DEBUG: \nmultiStoppable running proc: %v\nmultistop: %v\n",
sendStoppable, sendStoppable.GetRunningProcesses())
// Create a multi stoppable // Create a multi stoppable
multiStoppable := stoppable.NewMulti(fileTransferStoppable)
multiStoppable.Add(batchBuilderStop) multiStoppable.Add(batchBuilderStop)
multiStoppable.Add(sendStoppable)
jww.INFO.Printf("STOPPING FT THREAD DEBUG: \nmultiStoppable running proc: %v\nmultistop: %v\n", jww.INFO.Printf("STOPPING FT THREAD DEBUG: \nmultiStoppable running proc: %v\nmultistop: %v\n",
multiStoppable.GetRunningProcesses(), multiStoppable) multiStoppable.GetRunningProcesses(), multiStoppable)
......
...@@ -105,7 +105,7 @@ func (s *Single) Close() error { ...@@ -105,7 +105,7 @@ func (s *Single) Close() error {
return return
} }
jww.TRACE.Printf("Sending on quit channel to single stoppable %q.", jww.INFO.Printf("Sending on quit channel to single stoppable %q.",
s.Name()) s.Name())
// Send on quit channel // Send on quit channel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment