Azure / go-amqp

AMQP 1.0 client library for Go.
https://github.com/Azure/go-amqp
MIT License
110 stars 58 forks source link

Sender's delivery count and link credit can be out of sync on a failed transfer #298

Closed jhendrixMSFT closed 1 year ago

jhendrixMSFT commented 1 year ago

Sender's mux updated delivery count and link credit when a transfer frame is sent to its mux.

https://github.com/Azure/go-amqp/blob/main/sender.go#L370-L375

However, if the transfer fails to send, the values should be rolled back.

https://github.com/Azure/go-amqp/blob/main/sender.go#L181-L188

jhendrixMSFT commented 1 year ago

Note that this ONLY applies if the write failed due to the context being cancelled/timed out. If the write to net.Conn failed the Conn will terminate.