Skip to content

[bug] connection can not be recycled if there is no multicast message from kernel. #15

@abel-von

Description

@abel-von

Hi, we are using rtnetlink to find the links and routes, we need to create the handle repeatly because we have to do manipulate many network namespaces.

we have encountered an issue that the Connection which is created by new_connection can not be recycled when the 'Handle' is already dropped. after we call tokio::spawn(connection), the connection is inside tokio runtime and can not be dropped because it do not return Poll::Ready.

we checked the codes and found that it is because the unsolicited_message_tx has to be taken to none so that the should_shut_down can return true, but if there is no milticast message from the kernel to the socket, there is no chance that the unsolicited_message_tx be take to None.

image

maybe we can expose an API like new_connection_without_messages. and let unsolicited_message_tx to None if users do not care the multicast message. or maybe there are some other resolutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions