-
`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