mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-03-17 13:26:54 +01:00
minor
This commit is contained in:
@@ -31,14 +31,12 @@ public class LibreOfficeListener {
|
|||||||
private LibreOfficeListener() {}
|
private LibreOfficeListener() {}
|
||||||
|
|
||||||
private boolean isListenerRunning() {
|
private boolean isListenerRunning() {
|
||||||
try {
|
System.out.println("waiting for listener to start");
|
||||||
System.out.println("waiting for listener to start");
|
try (Socket socket = new Socket()) {
|
||||||
try (Socket socket = new Socket()) {
|
socket.connect(
|
||||||
socket.connect(
|
new InetSocketAddress("localhost", 2002), 1000); // Timeout after 1 second
|
||||||
new InetSocketAddress("localhost", 2002), 1000); // Timeout after 1 second
|
return true;
|
||||||
return true;
|
} catch (Exception e) {
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user