]> git.proxmox.com Git - mirror_corosync-qdevice.git/commit
qdevice: Fix connect heuristics result callback
authorJan Friesse <jfriesse@redhat.com>
Wed, 12 Aug 2020 13:42:12 +0000 (15:42 +0200)
committerJan Friesse <jfriesse@redhat.com>
Wed, 12 Aug 2020 13:52:18 +0000 (15:52 +0200)
commit8dbf1bc8b0f348e468e7c70448705ac92dab68ea
tree25e4884b3de0c46b62e3006764e5228afe482f88
parent8fc3c296b44e9abb9ef6a2dab7e8564076640e9d
qdevice: Fix connect heuristics result callback

Qdevice may crash if server disconnect before connect
heuristics callback is processed.

This is quite hard to reproduce without adding sleep before
qdevice_net_heuristics_exec_after_connect call.

Solution is to check if qdevice is still connected and if it doesn't,
just throw away connect heuristics results.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
qdevices/qdevice-net-heuristics.c