Archived
1
0

fix crash

This commit is contained in:
Jeff Becker 2019-03-03 12:55:54 -05:00
parent 3f8c583791
commit 43ce4490ed
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -1114,13 +1114,12 @@ func (self *httpFrontend) handle_api_find(wr http.ResponseWriter, r *http.Reques
}(wr) }(wr)
limit := 50 limit := 50
if len(h) > 0 { if len(h) > 0 {
self.daemon.database.SearchByHash(self.prefix, g, h, chnl, limit) go self.daemon.database.SearchByHash(self.prefix, g, h, chnl, limit)
} else { } else {
self.daemon.database.SearchQuery(self.prefix, g, s, chnl, limit) go self.daemon.database.SearchQuery(self.prefix, g, s, chnl, limit)
} }
chnl <- nil chnl <- nil
<-donechnl <-donechnl
close(donechnl)
io.WriteString(wr, " null ]") io.WriteString(wr, " null ]")
return return
} }