I have a ServerSocket class that binds properly. However, after a first connection connects and disconnects, it remains in TIME_WAIT state. When I restart the application, it would error out with:
Error #2002: Operation attempted on invalid socket.
At this point, I can see via netstat that there's a connection on TIME_WAIT. After I wait for the TIME_WAIT to disappear, I can start the application with no problem.
Looking at this (http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e 0811f00f7045b-7fc5Update.html), Yes, I know it's unrelated... but seems like FMS has an option to "reuse-address-enabled"
Which according to definition means:
(Optional) When set to false disables address reuse by the socket server. This causes the SocketServer to not start when it cannot bind to a port because the port is in a TIME_WAIT state. The default value is true, which allows the socket server to start if the port is in a TIME_WAIT state.
So, that seems to be the flag I need to enable on my AIR application. Anyone has any suggestions on how to do that?
Same problem here. Any progress?
Looking through documentation and do not seem to find setSockOpt equivalent to enable reuse_addr.
Nope, nothing yet. I just catch the exception, and tell the user to try again in "10 seconds"