diff --git a/code/go/0chain.net/blobbercore/allocation/connection.go b/code/go/0chain.net/blobbercore/allocation/connection.go index 85965510b..73d4ba03c 100644 --- a/code/go/0chain.net/blobbercore/allocation/connection.go +++ b/code/go/0chain.net/blobbercore/allocation/connection.go @@ -127,9 +127,11 @@ func SendCommand(connectionID, pathHash string, cmd FileCommand) error { } connChange := connectionProcessor[connectionID].changes[pathHash] if connChange == nil { + connectionObjMutex.RUnlock() return common.NewError("connection_change_not_found", "connection change not found") } if connChange.isFinalized { + connectionObjMutex.RUnlock() return common.NewError("connection_change_finalized", "connection change finalized") } connectionObjMutex.RUnlock() diff --git a/code/go/0chain.net/blobbercore/handler/file_command_delete.go b/code/go/0chain.net/blobbercore/handler/file_command_delete.go index 7b048309a..47902a65d 100644 --- a/code/go/0chain.net/blobbercore/handler/file_command_delete.go +++ b/code/go/0chain.net/blobbercore/handler/file_command_delete.go @@ -86,6 +86,7 @@ func (cmd *DeleteFileCommand) ProcessContent(allocationObj *allocation.Allocatio result.ValidationRoot = cmd.existingFileRef.ValidationRoot result.FixedMerkleRoot = cmd.existingFileRef.FixedMerkleRoot result.Size = cmd.existingFileRef.Size + result.IsFinal = true cmd.allocationChange = &allocation.AllocationChange{} cmd.allocationChange.ConnectionID = connectionID