Skip to content

Commit

Permalink
fix persistent rooms condition (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
odrling authored Dec 11, 2021
1 parent d60efab commit 566f90b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syncplay/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@ def removeWatcher(self, watcher):
oldRoom = watcher.getRoom()
if oldRoom:
oldRoom.removeWatcher(watcher)
if self._roomsDir is None or oldRoom.isStale(self._timer):
if self._roomsDbFile is None:
self._deleteRoomIfEmpty(oldRoom)

def _getRoom(self, roomName):
if roomName in self._rooms and not self._rooms[roomName].isStale(self._timer):
if roomName in self._rooms:
return self._rooms[roomName]
else:
if RoomPasswordProvider.isControlledRoom(roomName):
Expand Down

2 comments on commit 566f90b

@God-damnit-all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why the Windows workflow seems to be failing?

@Et0h
Copy link
Contributor

@Et0h Et0h commented on 566f90b Dec 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why the Windows workflow seems to be failing?

@ImportTaste I've not confirmed it, but my suspicion is that the build system changed to be one which couldn't handle null files. This would mean that it is now broken by https://github.com/Syncplay/syncplay/blob/master/.github/workflows/build.yml#L45 which creates a zero-byte syncplay.ini file for Syncplay portable. I've not tested it, but I hope that changing syncplay.ini from $NULL to a newline would fix it.

Please sign in to comment.