Closed TimEvens closed 7 months ago
Upon receiving the "close" callback, did you try using the existing API:
/* Retrieve the error codes after failure of a connection or of a stream */
uint64_t picoquic_get_local_error(picoquic_cnx_t* cnx)
{
return cnx->local_error;
}
uint64_t picoquic_get_remote_error(picoquic_cnx_t* cnx)
{
return cnx->remote_error;
}
uint64_t picoquic_get_application_error(picoquic_cnx_t* cnx)
{
return cnx->remote_application_error;
}
@huitema , thank you. I missed that. it does work. I am receiving 1075, which is PICOQUIC_ERROR_IDLE_TIMEOUT.
Today we only receive
picoquic_callback_close
callback (https://github.com/private-octopus/picoquic/blob/master/picoquic/sender.c#L3772) when a connection abruptly goes away (force terminate, network loss, ...). If a connection drops due to idle timeout, we would like to log it and handle reconnect differently than a protocol error, transport error, etc.Would it be possible to add a callback or field to indicate the reason for
picoquic_callback_close
?Below shows our logs on idle timeout. We don't know why it was disconnected.