METADAPT-A message writer returns an error when the transaction closes

This commit is contained in:
Sasha Koshka 2025-11-10 00:22:41 -05:00
parent 968e145cda
commit 0727609067

View File

@ -413,7 +413,7 @@ type writerA struct {
} }
func (this *writerA) Write(data []byte) (n int, err error) { func (this *writerA) Write(data []byte) (n int, err error) {
if !this.open { return 0, io.EOF } if !this.open || this.parent.closed.Load() { return 0, io.EOF }
toSend := data toSend := data
for len(toSend) > 0 { for len(toSend) > 0 {
nn, err := this.writeOne(toSend) nn, err := this.writeOne(toSend)