cap-protocol.c: gobject IO watch not removed properly
CategoryFixed. Fixed in: 555
Problem: the IO handler is not removed by shut_down_connection(). So if the FD is re-used and data arrives on it, the handler will be invoked and it will access an invalid pointer to a connection, causing a segfault or memory corruption.
Why didn't this happen before? Usually the connection gets closed because the other end closes the socket, not because our end drops its references. So why is this happening now? Is it when our end drops references that this happens?
Resolution
Fix bug by removing the IO watch when the connection is closed down.
