Skip to content

Commit

Permalink
Include err on fatal log (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim authored Nov 13, 2023
1 parent 44c065b commit 1feeefa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inabox/deploy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (env *Config) generateOperatorVars(ind int, name, key, churnerUrl, logPath,
//Generate cryptographically strong pseudo-random between 0 - max
n, err := rand.Int(rand.Reader, max)
if err != nil {
log.Fatal("Could not generate key")
log.Fatalf("Could not generate key: %v", err)
}

//String representation of n in base 32
Expand Down
6 changes: 2 additions & 4 deletions node/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package grpc
import (
"context"
"fmt"
"log"

"net"

Expand Down Expand Up @@ -77,7 +76,7 @@ func (s *Server) serveDispersal() error {
addr := fmt.Sprintf("%s:%s", localhost, s.config.InternalDispersalPort)
listener, err := net.Listen("tcp", addr)
if err != nil {
log.Fatal("Could not start tcp listener")
s.logger.Fatalf("Could not start tcp listener: %w", err)
}

opt := grpc.MaxRecvMsgSize(1024 * 1024 * 1024) // 1 GiB
Expand All @@ -98,11 +97,10 @@ func (s *Server) serveDispersal() error {
}

func (s *Server) serveRetrieval() error {

addr := fmt.Sprintf("%s:%s", localhost, s.config.InternalRetrievalPort)
listener, err := net.Listen("tcp", addr)
if err != nil {
log.Fatal("Could not start tcp listener")
s.logger.Fatalf("Could not start tcp listener: %w", err)
}

opt := grpc.MaxRecvMsgSize(1024 * 1024 * 300) // 300 MiB
Expand Down

0 comments on commit 1feeefa

Please sign in to comment.