logic tweak

This commit is contained in:
David Kelly 2017-05-04 16:33:50 -07:00
parent 5b56956637
commit a4125c1507

View file

@ -760,7 +760,10 @@
break; break;
case "done": case "done":
delete waitingList[senderID]; delete waitingList[senderID];
if (state === STATES.CONNECTING && connectingId === senderID) { if (connectionId !== senderID) {
break;
}
if (state === STATES.CONNECTING) {
// if they are done, and didn't connect us, terminate our // if they are done, and didn't connect us, terminate our
// connecting // connecting
if (message.connectionId !== MyAvatar.sessionUUID) { if (message.connectionId !== MyAvatar.sessionUUID) {
@ -776,7 +779,7 @@
stopConnecting(); stopConnecting();
} }
} else { } else {
if (state == STATES.MAKING_CONNECTION && connectingId === senderID) { if (state == STATES.MAKING_CONNECTION) {
// we are making connection, they just started, so lets reset the // we are making connection, they just started, so lets reset the
// poll count just in case // poll count just in case
pollCount = 0; pollCount = 0;