mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-12-23 08:40:18 +01:00
Another try to fix not removing last player.
This commit is contained in:
parent
6ffa0e1001
commit
6fb338dbb8
@ -133,13 +133,17 @@ func samePlayers(a, b []*player) bool {
|
||||
|
||||
func (ps *players) run() {
|
||||
for {
|
||||
ps.mu.Lock()
|
||||
empty := len(ps.pls) == 0
|
||||
ps.mu.Unlock()
|
||||
|
||||
pls, err := ps.readFromFIFO()
|
||||
if err != nil {
|
||||
//log.Printf("err: %s\n", err)
|
||||
time.Sleep(sleepInterval)
|
||||
continue
|
||||
}
|
||||
if pls == nil {
|
||||
if empty && pls == nil {
|
||||
//log.Println("no players")
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user