Skip to content

xmpp_connect_client does blocking I/O #260

@singpolyma

Description

@singpolyma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions