Participants can now join during the warning period as well.
Added RaceDataSourceToXML. RaceServer now create an XMLMessage when the race's RaceDataSource changes. #story[1188]
This commit is contained in:
@@ -109,6 +109,11 @@ public class ClientConnection implements Runnable {
|
||||
*/
|
||||
private ConnectionStateEnum connectionState = ConnectionStateEnum.UNKNOWN;
|
||||
|
||||
/**
|
||||
* The source ID that has been allocated to the client.
|
||||
* 0 means not allocated.
|
||||
*/
|
||||
private int allocatedSourceID = 0;
|
||||
|
||||
|
||||
|
||||
@@ -178,7 +183,7 @@ public class ClientConnection implements Runnable {
|
||||
|
||||
RequestToJoin requestToJoin = waitForRequestToJoin();
|
||||
|
||||
int allocatedSourceID = 0;
|
||||
allocatedSourceID = 0;
|
||||
|
||||
//If they want to participate, give them a source ID number.
|
||||
if (requestToJoin.getRequestType() == RequestToJoinEnum.PARTICIPANT) {
|
||||
@@ -283,6 +288,10 @@ public class ClientConnection implements Runnable {
|
||||
if (this.controllerServerThread != null) {
|
||||
this.controllerServerThread.interrupt();
|
||||
}
|
||||
|
||||
if (allocatedSourceID != 0) {
|
||||
sourceIdAllocator.returnSourceID(allocatedSourceID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user