Skip to content

Commit 4804471

Browse files
committed
[FAB-1447] Broadcaster exits normally at EOF
Make broadcast.(*broadcaster).queueEnvelopes() exits normally when it detects io.EOF at receiving a message from a client. If the orderer forwards io.EOF to a Node SDK client, Orderer.sendBroadcast() fails due to the error. I observed this error when I deploy a large chaincode with BATCHSIZE=1. Fix Issue # FAB-1447. https://jira.hyperledger.org/browse/FAB-1447 Signed-off-by: Tatsushi Inagaki <[email protected]> Change-Id: Icc6379bb04ceaab7ad463c0234d2419c34f8faca
1 parent b48f46d commit 4804471

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

orderer/common/broadcast/broadcast.go

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
ab "github.com/hyperledger/fabric/protos/orderer"
2323
"github.com/op/go-logging"
2424

25+
"io"
26+
2527
"github.com/golang/protobuf/proto"
2628
)
2729

@@ -118,6 +120,9 @@ func (b *broadcaster) queueEnvelopes(srv ab.AtomicBroadcast_BroadcastServer) err
118120
default:
119121
}
120122
msg, err := srv.Recv()
123+
if err == io.EOF {
124+
return nil
125+
}
121126
if err != nil {
122127
return err
123128
}

0 commit comments

Comments
 (0)