[FIX] Таймаут соеденения в 30 секунд

This commit is contained in:
Gravit 2019-03-25 04:35:32 +07:00
parent c9bcfcc8e0
commit 826a6c7567

View file

@ -310,6 +310,7 @@ public static Process launch(
try (ServerSocket socket = new ServerSocket()) { try (ServerSocket socket = new ServerSocket()) {
socket.setReuseAddress(true); socket.setReuseAddress(true);
socket.setSoTimeout(30000);
socket.bind(new InetSocketAddress(SOCKET_HOST, SOCKET_PORT)); socket.bind(new InetSocketAddress(SOCKET_HOST, SOCKET_PORT));
Socket client = socket.accept(); Socket client = socket.accept();
if (process == null) { if (process == null) {