diff --git a/scripts/system/makeUserConnection.js b/scripts/system/makeUserConnection.js index 4d8fe6cb8f..e70e0a2ea2 100644 --- a/scripts/system/makeUserConnection.js +++ b/scripts/system/makeUserConnection.js @@ -403,6 +403,7 @@ function startHandshake(fromKeyboard) { animHandlerId = MyAvatar.addAnimationStateHandler(shakeHandsAnimation, []); } debug("starting handshake for", currentHand); + pollCount = 0; state = STATES.waiting; connectingId = undefined; connectingHand = undefined; @@ -557,6 +558,7 @@ function handleConnectionResponseAndMaybeRepeat(error, response) { if (response && (response.connection === 'pending')) { debug(response, 'pollCount', pollCount); if (pollCount++ >= POLL_LIMIT) { // server will expire, but let's not wait that long. + debug('POLL LIMIT REACHED; TIMEOUT: expired message generated by CLIENT'); result = {status: 'error', connection: 'expired'}; connectionRequestCompleted(); } else { // poll