File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -169,18 +169,17 @@ io.on('connection', function (socket) {
169
169
currentPlayerIndex = null ;
170
170
171
171
// Turn off the timer
172
- clearInterval ( timerId ) ;
173
- timerId = null ;
172
+ clearInterval ( timerId ) ;
174
173
nextTurnChangeTimestamp = null ;
175
174
176
175
// Otherwise, if there are players left,
177
176
} else {
178
177
// If the disconnected user was the current player, restart timer and change the turn!
179
178
if ( socket . id === currentPlayerId ) {
180
179
console . log ( '\nCURRENT PLAYER disconnected! Restarting turn/timer.\n' ) ;
180
+
181
181
// Turn off the timer
182
- clearInterval ( timerId ) ;
183
- timerId = null ;
182
+ clearInterval ( timerId ) ;
184
183
nextTurnChangeTimestamp = null ;
185
184
186
185
// Re-initialize the turn (and timer), passing control to the next user
You can’t perform that action at this time.
0 commit comments