Skip to content
  • Iain Lane's avatar
    gnetworkmonitornetlink: Close the socket after disconnecting its GSources · 38482ead
    Iain Lane authored and Philip Withnall's avatar Philip Withnall committed
    `read_netlink_messages()` is the callback attached to the netlink socket
    (G_IO_IN). It calls `g_socket_receive_message()`. There is a race
    condition that if the socket is closed while there is a pending call, we
    will try to receive on a closed socket, which fails.
    
    To avoid this, we switch the order of the operations around: first
    destroy the source and then close the socket.
    38482ead