int08h/roughenough

Properly handle failed writes to clients

Closed this issue · 1 comments

The "fix" for #33 simply throws away any errors. Instead it should re-attempt delivery in some way.

match socket.send_to(&resp_bytes, &src_addr) {
    Ok(n_bytes) => bytes_sent = n_bytes,
    Err(_) => successful_send = false,
}

Subtlety: retry logic must ensure that the MIDP time of any in-flight response(s) stays within the uncertainty RADI range. Depending on how long we choose to attempt retrying, crafting a entirely new message might be necessary.

Details in #33