Skip to content

Commit

Permalink
Merge pull request #111 from hyperledger/fix-unreg-panic
Browse files Browse the repository at this point in the history
Fix panic in un-register
  • Loading branch information
nguyer authored Jun 19, 2023
2 parents b46951b + a3df813 commit 37e40f3
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 37e40f3

Please sign in to comment.