enable locking for conncet() to avoid simultaneous connection attempts