You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I encountered a strange phenomenon about a uds-type client socket object exception created using junixsocket.
To Reproduce
Steps to reproduce the behavior:
I make one uds Socket like this:
public Socket createSocket() throws IOException, JedisConnectionException {
// udsPath is sock file path ,and is not empty
AFUNIXSocketFactory.FactoryArg factoryArg = new AFUNIXSocketFactory.FactoryArg(this.udsPath);
Socket socket = factoryArg.createSocket();
if (this.socketTimeout.get() > 0) {
socket.setSoTimeout(this.socketTimeout.get());
}
socket.connect(new InetSocketAddress("localhost", 0));
return socket;
}
Expected behavior
After the Socket object invokes the connect method for connection, several common methods of the Socket interface are invoked. For example, socket.isBound() returns true, socket.isClosed() returns false, and socket.isConnected() returns true. The socket.isInputShutdown() method returns false, and the socket.isOutputShutdown() method returns false.
However, after a short period of time, several methods of the socket object will return different values: socket.isBound() returns false, socket.isConnected() returns false, socket.isInputShutdown() and socket.isOutputShutdown() both return true, but the socket.isClose() method returns false.
This exception occurs in the created socket for a short period of time.
I suspect that the UDS Socket occupies some Linux system resources. When resources are insufficient, Linux releases the resources of the UDS Socket.
Notes
Add any other context about the problem here. Please link/attach any source code that is useful to diagnose the issue.
Version: junixsocket-2.6.2
Java Version:1.8
The text was updated successfully, but these errors were encountered:
2.6.2 is very outdated. Before investigating this deeper, please retry with the latest version, junixsocket 2.10.1.
Please also include some sort of unit test / reproduction code, if possible.
Describe the bug
I encountered a strange phenomenon about a uds-type client socket object exception created using junixsocket.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After the Socket object invokes the connect method for connection, several common methods of the Socket interface are invoked. For example, socket.isBound() returns true, socket.isClosed() returns false, and socket.isConnected() returns true. The socket.isInputShutdown() method returns false, and the socket.isOutputShutdown() method returns false.
However, after a short period of time, several methods of the socket object will return different values: socket.isBound() returns false, socket.isConnected() returns false, socket.isInputShutdown() and socket.isOutputShutdown() both return true, but the socket.isClose() method returns false.
This exception occurs in the created socket for a short period of time.
I suspect that the UDS Socket occupies some Linux system resources. When resources are insufficient, Linux releases the resources of the UDS Socket.
Notes
Add any other context about the problem here. Please link/attach any source code that is useful to diagnose the issue.
Version: junixsocket-2.6.2
Java Version:1.8
The text was updated successfully, but these errors were encountered: