Skip to content

SocketTimeout not handled properly #22

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1.m_serverSocket = AFUNIXServerSocket.newInstance();
2.m_serverSocket.bind(new AFUNIXSocketAddress(socketFile));
3.m_serverSocket.setSoTimeout(30 * 1000); // timeout for 30 seconds
4. In run(), call m_serverSocket.accept() in a try/catch. Catch 
SocketTimeoutException to print debug and continue...

What is the expected output? What do you see instead?
Expect to see a ServerTimeoutException, as specified in java.net.ServerSocket. 
Since this class extends ServerSocket, and no mention of different behavior is 
specified, would expect same behavior as documented in super class.

Instead:
org.newsclub.net.unix.AFUNIXSocketException: Resource temporarily unavailable 
(socket: <path to socket>)
        at org.newsclub.net.unix.NativeUnixSocket.accept(Native Method)
        at org.newsclub.net.unix.AFUNIXSocketImpl.accept(AFUNIXSocketImpl.java:58)
        at org.newsclub.net.unix.AFUNIXServerSocket.accept(AFUNIXServerSocket.java:104)

What version of the product are you using? On what operating system?
1.3

Please provide any additional information below.


Original issue reported on code.google.com by droid.l...@gmail.com on 1 Jan 2012 at 8:41

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions