news_fetcher: unlock mutex before terminating
parent
5df31c16f7
commit
d88315d789
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue