add locking around driver _connect()