From 75132e631a9748c0fe9380eae301f202a55687a4 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 29 Dec 2015 20:59:16 -0600 Subject: [PATCH] plasma: don't return, exit --- plasma.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plasma.go b/plasma.go index 2118c3b2..3027e167 100644 --- a/plasma.go +++ b/plasma.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" "net" + "os" "google.golang.org/grpc" "google.golang.org/grpc/grpclog" @@ -29,13 +30,15 @@ func main() { lnwallet, err := lnwallet.NewLightningWallet(config) if err != nil { fmt.Printf("unable to create wallet: %v\n", err) - return + os.Exit(1) } if err := lnwallet.Startup(); err != nil { fmt.Printf("unable to start wallet: %v\n", err) - return + os.Exit(1) } + fmt.Println("wallet open") + // Initialize, and register our implementation of the gRPC server. var opts []grpc.ServerOption rpcServer := newRpcServer(lnwallet) @@ -47,7 +50,7 @@ func main() { if err != nil { grpclog.Fatalf("failed to listen: %v", err) fmt.Printf("failed to listen: %v", err) - return + os.Exit(1) } grpcServer.Serve(lis) }