plasma: don't return, exit

This commit is contained in:
Olaoluwa Osuntokun 2015-12-29 20:59:16 -06:00
parent d3da6e8f42
commit 75132e631a

@ -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)
}