Skip to content

Commit da89356

Browse files
Added error handling for remote txns
1 parent dbdb625 commit da89356

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/transprocessor/remotetxn.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
"github.com/PythonHacker24/linux-acl-management-backend/internal/types"
99
protos "github.com/PythonHacker24/linux-acl-management-backend/proto"
10-
"go.uber.org/zap"
1110
)
1211

1312
/* NEED TO ADD DURATION TIME -> EXISTS IN LOCAL */
@@ -24,10 +23,8 @@ func (p *PermProcessor) HandleRemoteTransaction(host string, port int, txn *type
2423
address := fmt.Sprintf("%s:%d", host, port)
2524
conn, err := p.gRPCPool.GetConn(address, p.errCh)
2625
if err != nil {
27-
zap.L().Error("Failed to get connect with a daemon",
28-
zap.String("Address", address),
29-
zap.Error(err),
30-
)
26+
p.errCh <- err
27+
return fmt.Errorf("failed to connect with a daemon: %s", address)
3128
}
3229

3330
/* make it a for loop for interating all entries */

0 commit comments

Comments
 (0)