Use Timer T1 retry counter for DISC sequence
This commit is contained in:
parent
aff5eabff3
commit
44ec0040a8
1 changed files with 13 additions and 0 deletions
13
src/server.c
13
src/server.c
|
@ -2192,6 +2192,19 @@ static int handle_sock(uint32_t key,
|
|||
return patty_ax25_sock_send_rr(sock, PATTY_AX25_FRAME_COMMAND, 1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PATTY_AX25_SOCK_PENDING_DISCONNECT:
|
||||
if (patty_timer_expired(&sock->timer_t1)) {
|
||||
if (sock->retries--) {
|
||||
patty_timer_start(&sock->timer_t1);
|
||||
|
||||
return patty_ax25_sock_send_disc(sock, PATTY_AX25_FRAME_POLL);
|
||||
} else {
|
||||
return sock_close(server, sock);
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue