thanks for the updated patch, seems to work fine as far as I can see, however there is a small drawback:
when the connection dies, and on each unsuccsessful reconnection attempt, then two error windows show up, stealing the focus from other active applications.
This is A) at least one error message too much,
B) stealing the focus every X seconds from the active application is not good
Better would be a message window, informing the user that coccinella is trying to reconnect, which should either just stay there, as long as it tries to reconnect, and disappears, when reconnection attempt is successful. When that message window appears, I think it should not have focus.