diff --git a/src/components/Farmhand/Farmhand.js b/src/components/Farmhand/Farmhand.js index a7d42fef2..1251cb046 100644 --- a/src/components/Farmhand/Farmhand.js +++ b/src/components/Farmhand/Farmhand.js @@ -668,6 +668,7 @@ export default class Farmhand extends FarmhandReducers { const decodedRoom = decodeURIComponent(newRoom) + // NOTE: This indicates that the client should attempt to connect to the server const newIsOnline = path.startsWith('/online') if (newIsOnline !== this.state.isOnline || decodedRoom !== room) { @@ -679,7 +680,9 @@ export default class Farmhand extends FarmhandReducers { } if (isOnline !== prevState.isOnline || room !== prevState.room) { - this.syncToRoom() + if (newIsOnline) { + this.syncToRoom() + } if (!isOnline && typeof heartbeatTimeoutId === 'number') { clearTimeout(heartbeatTimeoutId)