Compare commits

...

3 Commits

3 changed files with 13 additions and 5 deletions

View File

@@ -7,7 +7,7 @@
</parent>
<groupId>net.bigeon.gclc</groupId>
<artifactId>socket</artifactId>
<version>1.1.15-SNAPSHOT</version>
<version>1.1.15</version>
<packaging>jar</packaging>
<name>GCLC Socket</name>
<description>Socket implementation of GCLC</description>
@@ -36,7 +36,7 @@
</developers>
<scm>
<developerConnection>scm:git:gogs@git.code.bigeon.net:emmanuel/gclc.git</developerConnection>
<tag>HEAD</tag>
<tag>socket-1.1.15</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@@ -41,6 +41,7 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.InterruptedIOException;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.util.function.Supplier;
@@ -119,6 +120,7 @@ public final class PluggableConsoleInput implements ConsoleInput {
if (prompting) {
// print the hint, to indicate we are waiting for a user input.
out.print(hint);
out.println();
out.flush();
}
final InputStreamReader streamReader = new InputStreamReader(stream,
@@ -279,7 +281,13 @@ public final class PluggableConsoleInput implements ConsoleInput {
final long connexionTimeout) throws IOException, InterruptedException {
synchronized (connexionLock) {
if (connected) {
return connexion.getNextMessage(messageTimeout);
try {
return connexion.getNextMessage(messageTimeout);
} catch (final InterruptedIOException e) {
throw e;
} catch (final IOException e) {
LOGGER.log(Level.INFO, "Communication was abrubptly interrupted", e);
}
}
connexionLock.wait(connexionTimeout);
}

View File

@@ -7,7 +7,7 @@
</parent>
<groupId>net.bigeon.gclc</groupId>
<artifactId>swt</artifactId>
<version>1.2.0</version>
<version>1.2.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GCLC swt</name>
<description>A swt window for console applications</description>
@@ -36,7 +36,7 @@
</developers>
<scm>
<developerConnection>scm:git:gogs@git.code.bigeon.net:emmanuel/gclc.git</developerConnection>
<tag>swt-1.2.0</tag>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>