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>
Fri, 25 Feb 2022 07:00:51 +0000 (08:00 +0100)
commit5ec4efca61906608e2e7a590b3d1c3f2b7078e81
treeec5b593686870a321daea0ae02037917fb41a59b
parent76e2d6390305eeb59e4934ca66013b09b4a44dda
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