You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2016/01/26 01:50:39 UTC
[jira] [Created] (GEODE-858) InternalLocator.startTcpServer has a 1
second sleep
Dan Smith created GEODE-858:
-------------------------------
Summary: InternalLocator.startTcpServer has a 1 second sleep
Key: GEODE-858
URL: https://issues.apache.org/jira/browse/GEODE-858
Project: Geode
Issue Type: Bug
Reporter: Dan Smith
This method has a 1 second sleep. Looking at the code, there doesn't seem to be any reason to sleep. server.start has already created the tcp socket for the server, so clients should be able to connect after that call has done. They will wait until the acceptor thread invokes accept, but that seems reasonable.
The issue with this sleep is that all of our WAN tests (several hundred) start multiple locators in each test, so this adds a lot of time to our WAN tests.
{code}
private void startTcpServer() throws IOException {
logger.info(LocalizedMessage.create(LocalizedStrings.InternalLocator_STARTING_0, this));
server.start();
try {
Thread.sleep(1000);
}
catch (InterruptedException ie) {
// always safe to exit this thread...
Thread.currentThread().interrupt();
logger.warn(LocalizedMessage.create(LocalizedStrings.ONE_ARG, "Interrupted"), ie);
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)