Fix some dubious thread/locking behaviour.
authorCarl Hetherington <cth@carlh.net>
Thu, 24 Feb 2022 18:47:19 +0000 (19:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 3 Mar 2022 20:54:38 +0000 (21:54 +0100)
commita190ee3b457cf9be650556ce0496415bcd3b9e7b
tree8663d6807b9ab5d77f733c571a753d3866f0b47f
parent5ea930a778ea350c5e3d1adc45d84b075cfdbaa0
Fix some dubious thread/locking behaviour.

Previously we had server_found(), which took the lock and found
a server, which it returned as an iterator into the list.
However, it then released the lock, which I think left the
iterator unprotected.

This wasn't done in response to any particular bug, I just
noticed it on the way past.
src/lib/encode_server_finder.cc
src/lib/encode_server_finder.h