[#11] Use gRPC handlers in neofs-node application

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-22 14:03:45 +03:00 committed by Alex Vanin
parent c2954aab20
commit 65eb1181e9
3 changed files with 87 additions and 57 deletions

View file

@ -15,9 +15,11 @@ func fatalOnErr(err error) {
func main() {
c := defaultCfg()
fatalOnErr(serveGRPC(c))
c.ctx = grace.NewGracefulContext(nil)
ctx := grace.NewGracefulContext(nil)
serveGRPC(c)
<-ctx.Done()
<-c.ctx.Done()
c.wg.Wait()
}