Make reconnect variables thread safe

Signed-off-by: Lewis Marshall <lewis@lmars.net>