Looking at the code (specifically modules/access_output/udp.c), I could see that this line (line 524 in version 0.8.0-test2):
Code: Select all
send( p_thread->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 );
Then I replaced the previous line with this block of code:
Code: Select all
{
#define NBTRYMAX 10
int nbsent=-1;
int nbtry=0;
while (nbsent==-1 && nbtry++ < NBTRYMAX)
{
nbsent = send( p_thread->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 );
}
if (nbtry > 1)
{
if (nbsent==-1)
{
msg_Dbg( p_thread, "Error : One packet could not be sent after %d attempts.", NBTRYMAX);
}
else
{
msg_Dbg( p_thread, "Warning : packet sent after %d attempts", nbtry);
}
}
}