fix: prevent autoping disable on false negative ping support check
Some checks failed
CI Code / Check spelling (pull_request) Successful in 20s
CI Code / Check coding style (pull_request) Successful in 35s
CI Code / Linux (arch) (pull_request) Failing after 53s
CI Code / Linux (debian) (pull_request) Failing after 1m15s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m54s
Some checks failed
CI Code / Check spelling (pull_request) Successful in 20s
CI Code / Check coding style (pull_request) Successful in 35s
CI Code / Linux (arch) (pull_request) Failing after 53s
CI Code / Linux (debian) (pull_request) Failing after 1m15s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m54s
Remove autodisable logic (prefs_set_autoping(0)) and early return in autoping to treat intermittent false negatives from connection_supports(XMPP_FEATURE_PING). Add one-time error display with debug features print for monitoring; warn on first failing check without aborting to maintain functionality while investigating root cause.
This commit is contained in:
@@ -979,6 +979,7 @@ _connection_handler(xmpp_conn_t* const xmpp_conn, const xmpp_conn_event_t status
|
||||
|
||||
connection_get_jid();
|
||||
conn.domain = strdup(conn.jid->domainpart);
|
||||
log_debug("conn.domain=%s", conn.jid->domainpart);
|
||||
|
||||
connection_clear_data();
|
||||
conn.features_by_jid = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)g_hash_table_destroy);
|
||||
@@ -1163,3 +1164,32 @@ connection_get_profanity_identifier(void)
|
||||
{
|
||||
return prof_identifier;
|
||||
}
|
||||
|
||||
void
|
||||
connection_debug_print_features()
|
||||
{
|
||||
log_debug("=== Connection Features ===");
|
||||
|
||||
GHashTableIter iter;
|
||||
gpointer jid_ptr, features_ptr;
|
||||
|
||||
g_hash_table_iter_init(&iter, conn.features_by_jid);
|
||||
while (g_hash_table_iter_next(&iter, &jid_ptr, &features_ptr)) {
|
||||
const char* jid = (const char*)jid_ptr;
|
||||
GHashTable* features = (GHashTable*)features_ptr;
|
||||
|
||||
if (!features || g_hash_table_size(features) == 0) {
|
||||
log_debug("%s:\t(no features)", jid);
|
||||
continue;
|
||||
}
|
||||
|
||||
GList* feature_keys = g_hash_table_get_keys(features);
|
||||
for (GList* l = feature_keys; l != NULL; l = l->next) {
|
||||
const char* feature = (const char*)l->data;
|
||||
log_debug("%s:\t%s", jid, feature);
|
||||
}
|
||||
g_list_free(feature_keys);
|
||||
}
|
||||
|
||||
log_debug("=== End of Features ===");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user