Reset socket retry counter for each frame acked

This commit is contained in:
XANTRONIX Development 2020-08-20 22:01:58 -05:00 committed by XANTRONIX Industrial
parent 06ddf1bbaf
commit 697ade0afa

View file

@ -1275,7 +1275,8 @@ static int frame_ack(patty_ax25_server *server,
} }
if (frame->nr >= min && frame->nr <= max) { if (frame->nr >= min && frame->nr <= max) {
sock->vs = frame->nr; sock->vs = frame->nr;
sock->retries = sock->n_retry;
patty_timer_start(&sock->timer_t1); patty_timer_start(&sock->timer_t1);
} }
@ -2192,8 +2193,6 @@ static int handle_sock(uint32_t key,
if ((len = patty_ax25_sock_resend_pending(sock)) < 0) { if ((len = patty_ax25_sock_resend_pending(sock)) < 0) {
goto error_sock_resend_pending; goto error_sock_resend_pending;
} else if (len > 0) { } else if (len > 0) {
sock->retries = sock->n_retry;
patty_timer_start(&sock->timer_t1); patty_timer_start(&sock->timer_t1);
return 0; return 0;
@ -2212,8 +2211,6 @@ static int handle_sock(uint32_t key,
goto error_sock_write; goto error_sock_write;
} }
sock->retries = sock->n_retry;
patty_timer_start(&sock->timer_t1); patty_timer_start(&sock->timer_t1);
} }