fix crash
This commit is contained in:
parent
3f8c583791
commit
43ce4490ed
@ -1114,13 +1114,12 @@ func (self *httpFrontend) handle_api_find(wr http.ResponseWriter, r *http.Reques
|
||||
}(wr)
|
||||
limit := 50
|
||||
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 {
|
||||
self.daemon.database.SearchQuery(self.prefix, g, s, chnl, limit)
|
||||
go self.daemon.database.SearchQuery(self.prefix, g, s, chnl, limit)
|
||||
}
|
||||
chnl <- nil
|
||||
<-donechnl
|
||||
close(donechnl)
|
||||
io.WriteString(wr, " null ]")
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user