Skip to content

Commit 383216a

Browse files
committed
Removed DelayService defensive code fix for jme issue jMonkeyEngine/jmonkeyengine@0d8fe2a
1 parent b6e415e commit 383216a

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

sim-eth-es/src/main/java/example/net/server/GameServer.java

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public GameServer( int port, String description ) throws IOException {
121121
// service gets to run let's the client get a small break in the buffer that should
122122
// generally prevent the RpcCall messages from coming too quickly and getting processed
123123
// before the SerializerRegistrationMessage has had a chance to process.
124-
server.getServices().addService(new DelayService());
125124

126125
server.getServices().addServices(new RpcHostedService(),
127126
new RmiHostedService(),
@@ -306,41 +305,7 @@ public static void main( String... args ) throws Exception {
306305

307306
gs.close();
308307
}
309-
310-
// Just for debugging something
311-
private class DelayService extends AbstractHostedService {
312-
313-
private void safeSleep( long ms ) {
314-
try {
315-
Thread.sleep(ms);
316-
} catch( InterruptedException e ) {
317-
throw new RuntimeException("Checked exceptions are lame", e);
318-
}
319-
}
320-
321-
@Override
322-
protected void onInitialize( HostedServiceManager serviceManager ) {
323-
System.out.println("DelayService.onInitialize()");
324-
//safeSleep(2000);
325-
//System.out.println("DelayService.delay done");
326-
}
327-
328-
@Override
329-
public void start() {
330-
System.out.println("DelayService.start()");
331-
//safeSleep(2000);
332-
//System.out.println("DelayService.delay done");
333-
}
334-
335-
@Override
336-
public void connectionAdded(Server server, HostedConnection hc) {
337-
// Just in case
338-
super.connectionAdded(server, hc);
339-
System.out.println("DelayService.connectionAdded(" + hc + ")");
340-
safeSleep(500);
341-
System.out.println("DelayService.delay done");
342-
}
343-
}
308+
344309
}
345310

346311

0 commit comments

Comments
 (0)