Skip to content

Commit

Permalink
default behavior is now only 'waitforall' the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
shiffman committed Jul 23, 2013
1 parent eedf4d3 commit 38c7889
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Most-Pixels-Ever-Server/src/mpe/server/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ void read(String msg) {

System.out.println("Connecting Client " + clientID);
int total = parent.totalConnections();

if (parent.waitForAll) {

// We should only wait the *first* time if we are told to wait for everyone
// otherwise we can just reset if someone has disconnected and reconnected
if (parent.waitForAll && !parent.allConnected) {
parent.allConnected = (total == parent.numRequiredClients);
if (parent.allConnected) parent.triggerFrame(false);
if (parent.allConnected) {
parent.triggerFrame(false);
}
} else {
parent.triggerFrame(true);
}
Expand Down

0 comments on commit 38c7889

Please sign in to comment.