google / rust-async-coap

A flexible, asynchronous library for using and serving CoAP resources in Rust.
Apache License 2.0
51 stars 17 forks source link

async-coap/datagram: Fix for MID not changing during block2 #29

Closed darconeous closed 3 years ago

darconeous commented 4 years ago

It was noticed that the SendFuture implementation wasn't properly changing the message ID for each new block request. This change makes sure that a new message ID is fetched at every call to transmit(). Calls to retransmit() will continue to use the message ID from the previous call to transmit().