While disconnected, newly submitted commands are queued, yet scheduled for
immediate failure. The timeout used for that was not cleaned up.
smtp_client_connection_clear_password(conn);
smtp_client_connection_disconnect(conn);
+ /* could have been created while already disconnected */
+ timeout_remove(&conn->to_commands);
+
smtp_client_connection_debug(conn, "Destroy");
if (conn->reply_parser != NULL)
conn->closed = TRUE;
smtp_client_connection_disconnect(conn);
+
+ /* could have been created while already disconnected */
+ timeout_remove(&conn->to_commands);
+
smtp_client_connection_unref(&conn);
}