Reconnect on network errors; use Mutexes to control Socket access more precisely