You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus making it unsafe to call from an event loop thread. However I do not think it would be safe to call it from a separate thread either, probably all of libstrophe calls would need to be moved in that case?
It calls sock_new which calls resolver_srv_lookup which then calls either res_query or resolver_ares_srv_lookup both of which are blocking and may take many seconds.
sock_new also calls sock_getaddrinfo which calls getaddrinfo which is also a slow blocking call.
xmpp_connect_client also calls _conn_connect which then calls sock_connect which also calls sock_getaddrinfo
sock_connect also calls connect but this is after the socket is set to nonblocking so I think that may not be a blocking call here.
Activity
pasis commentedon Dec 20, 2025
Entire TLS handshake is also blocking IIRC. This can be critical based on where xmpp_run_once() is called.
singpolyma commentedon Dec 21, 2025
thanks for this tip, I'll be trying to find and fix any other blocking calls over the next while