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)
|
}(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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user