Skip to content

Commit

Permalink
Fix panic in un-register
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Broadhurst <[email protected]>
  • Loading branch information
peterbroadhurst committed Jun 19, 2023
1 parent b46951b commit a3df813
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/fabric/client/invokehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func (h *txSubmitAndListenHandler) Handle(requestContext *invoke.RequestContext,

select {
case txStatus := <-statusNotifier:
if txStatus == nil {
requestContext.Error = status.New(status.EventServerStatus, int32(pb.TxValidationCode_INVALID_OTHER_REASON),
"channel closed due to unregister", nil)
return
}
requestContext.Response.TxValidationCode = txStatus.TxValidationCode
h.txStatusEvent.BlockNumber = txStatus.BlockNumber
h.txStatusEvent.SourceURL = txStatus.SourceURL
Expand Down

0 comments on commit a3df813

Please sign in to comment.