news_fetcher: unlock mutex before terminating

pull/1755/head
Robin Martijn 2019-08-26 15:55:40 +02:00 committed by Alexander Medvednikov
parent 5df31c16f7
commit d88315d789
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ fn (f mut Fetcher) fetch() {
for { for {
f.mu.lock() f.mu.lock()
if f.cursor >= f.ids.len { if f.cursor >= f.ids.len {
f.mu.unlock()
return return
} }
id := f.ids[f.cursor] id := f.ids[f.cursor]