Skip to content

Call isccc_ccmsg_invalidate() when shutting down the connection

Ondřej Surý requested to merge 4211-fix-data-race-in-controlconf into main

Previously, the isccc_ccmsg_invalidate() was called from conn_free() and this could lead to netmgr calling control_recvmessage() after we detached the reading controlconnection_t reference, but it wouldn't be the last reference because controlconnection_t is also attached/detached when sending response or running command asynchronously.

Instead, move the isccc_ccmsg_invalidate() call to control_recvmessage() error handling path to make sure that control_recvmessage() won't be ever called again from the netmgr.

Closes #4211 (closed)

Edited by Ondřej Surý

Merge request reports