Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torrentfs/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (m *Monitor) parseBlockTorrentInfo(b *Block, flowCtrl bool) error {
func (m *Monitor) Stop() {
log.Info("Torrent listener closing")
atomic.StoreInt32(&(m.terminated), 1)
//close(m.exitCh)
close(m.exitCh)
//m.wg.Wait()
m.wg.Wait()
/*m.wg.Add(1)
Expand Down Expand Up @@ -897,7 +897,7 @@ func (m *Monitor) syncLastBlock() uint64 {
if atomic.LoadInt32(&(m.terminated)) == 1 {
log.Warn("Torrent scan terminated", "number", i)
maxNumber = i - 1
close(m.exitCh)
//close(m.exitCh)
break
}

Expand Down
4 changes: 2 additions & 2 deletions torrentfs/torrentClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ func (tm *TorrentManager) Close() error {
}

func (tm *TorrentManager) dropAll() {
//tm.lock.Lock()
//tm.lock.Unlock()
tm.lock.Lock()
tm.lock.Unlock()
defer tm.client.Close()
for _, t := range tm.torrents {
stats := t.Stats()
Expand Down