fix: Закрытие сокета после неудачи
This commit is contained in:
@@ -48,6 +48,11 @@ public class SocketServer {
|
|||||||
DataChannel channel = DataChannelFactory.newDataChannelViaSupportedProtocol(socket, protocol);
|
DataChannel channel = DataChannelFactory.newDataChannelViaSupportedProtocol(socket, protocol);
|
||||||
|
|
||||||
if (channel == null) {
|
if (channel == null) {
|
||||||
|
try {
|
||||||
|
socket.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user