etcp: TCP links skip remote keepalive gating; chatgui: show interface names in member detail, fix destructor callbacks

This commit is contained in:
evgeny committed 2026-08-08 07:31:38 +03:00
1 parent 80e77f12c2
commit d453e73ddb
4 files changed
+62 -10

No files matched your search

+3 -6
View File
@@ -62,9 +62,6 @@ void tcp_server_on_link(struct stcp_link *link, void *arg) {
etcp_update_log_name(conn);
{ struct conn_queue_entry* ce = (struct conn_queue_entry*)conn->conn_queue_entry->data; ce->peer_node_id = node_id; queue_remove_data(conn->conn_queue, conn->conn_queue_entry); queue_data_put_with_index(conn->conn_queue, conn->conn_queue_entry); }
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "tcp_server_on_link: new ETCP_CONN peer=0x%016llx", (unsigned long long)node_id);
} else {
struct ETCP_LINK* nl = conn->links;
while (nl) { struct ETCP_LINK* nx = nl->next; if (nl->is_tcp) etcp_link_close(nl); nl = nx; }
}
struct ETCP_LINK *tlink = etcp_link_new(conn, NULL, NULL, 1);
@@ -306,7 +303,7 @@ static void etcp_link_send_keepalive(struct ETCP_LINK* link) {
dgram->data_len = 3;
dgram->noencrypt_len = 0;
dgram->timestamp = get_current_timestamp();
dgram->flag_up = link->recv_keepalive;
dgram->flag_up = link->is_tcp ? 1 : link->recv_keepalive;
link->keepalive_sent_count++;
@@ -1153,7 +1150,7 @@ static int etcp_tcp_send(struct ETCP_DGRAM* dgram) {
struct ETCP_LINK *link = dgram->link;
if (!link->tcp_link || !stcp_link_is_ready(link->tcp_link)) return -1;
link->pkt_sent_since_keepalive = 1;
dgram->flag_up = link->recv_keepalive;
dgram->flag_up = 1;
int rc;
if (link->send_hook) rc = (int)link->send_hook(0, dgram->data, dgram->data_len, NULL, 0, link, link->send_hook_ctx);
else if (link->tcp_link) rc = stcp_link_send(link->tcp_link, dgram->data, dgram->data_len) == 0 ? (int)dgram->data_len : -1;
@@ -2238,7 +2235,7 @@ process_decrypted:
}
int was_up = link->link_status;
link->link_status = link->remote_keepalive && link->recv_keepalive;
link->link_status = link->is_tcp ? link->recv_keepalive : (link->remote_keepalive && link->recv_keepalive);
if (link->link_status != was_up)
etcp_fire_link_status_cbk(link, link->link_state, was_up);
if (link->link_status && !was_up && link->initialized) {