gobgpd: die when grpc server failed to listen

Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
ISHIDA Wataru
2016-01-04 13:11:07 +09:00
committed by FUJITA Tomonori
parent b976eb7d2f
commit 11c77a2003
+5 -1
View File
@@ -169,7 +169,11 @@ func main() {
// start grpc Server
grpcServer := server.NewGrpcServer(opts.GrpcPort, bgpServer.GrpcReqCh)
go grpcServer.Serve()
go func() {
if err := grpcServer.Serve(); err != nil {
log.Fatalf("failed to listen grpc port: %s", err)
}
}()
var bgpConfig *config.Bgp = nil
var policyConfig *config.RoutingPolicy = nil