From 43ce4490edd9d1439549a07d7cd7d843757609d7 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 3 Mar 2019 12:55:54 -0500 Subject: [PATCH] fix crash --- contrib/backends/srndv2/src/srnd/frontend_http.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/frontend_http.go b/contrib/backends/srndv2/src/srnd/frontend_http.go index ab8702a..186dc60 100644 --- a/contrib/backends/srndv2/src/srnd/frontend_http.go +++ b/contrib/backends/srndv2/src/srnd/frontend_http.go @@ -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 }