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) {
169169 currentPlayerIndex = null ;
170170
171171 // Turn off the timer
172- clearInterval ( timerId ) ;
173- timerId = null ;
172+ clearInterval ( timerId ) ;
174173 nextTurnChangeTimestamp = null ;
175174
176175 // Otherwise, if there are players left,
177176 } else {
178177 // If the disconnected user was the current player, restart timer and change the turn!
179178 if ( socket . id === currentPlayerId ) {
180179 console . log ( '\nCURRENT PLAYER disconnected! Restarting turn/timer.\n' ) ;
180+
181181 // Turn off the timer
182- clearInterval ( timerId ) ;
183- timerId = null ;
182+ clearInterval ( timerId ) ;
184183 nextTurnChangeTimestamp = null ;
185184
186185 // Re-initialize the turn (and timer), passing control to the next user
You can’t perform that action at this time.
0 commit comments