http://bugs.winehq.org/show_bug.cgi?id=21420
Summary: VB6 winsock.close from server will get port stuck for about a minute Product: Wine Version: 1.1.35 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: winsock AssignedTo: wine-bugs@winehq.org ReportedBy: razorwings18@hotmail.com
Created an attachment (id=25798) --> (http://bugs.winehq.org/attachment.cgi?id=25798) Client and Server sample apps including executables and source
SETUP: - COMPUTER "A": Client application using WINSOCK via TCP/IP to connect to server - COMPUTER "B": Server application using WINSOCK to listen to incomming connections from clients on a particular port - Both applications are written in Visual Basic 6
When the client app connects using Winsock via TCP/IP to the Winsock server, and the server side executes the CLOSE method, the client gets properly disconnected, but the server's port on which the connection was performed will stay "stuck" for about 1 minute, not being able to listen for new connections on that port.
Invoking Winsock's CLOSE method from the client properly disconnects both parties.
This problem is not present on Windows, with closing from either side properly and immediately closing the connection and freeing the port.
See attached sample applications. They will connect on port 10013. To reproduce errors in sample apps: - Run CLIENT.EXE in client computer - Run SERVERTEST.EXE in server computer (can both be run in the same box) - In CLIENT, enter server IP in the textbox and click CONNECT. You should see "Incoming connection from XXX.XXX.XXX.XXX" in the server if properly connected. - Click CLOSE CONNECTION FROM SERVER. - In WINE, you will see "Error in command:..." and "Error executing TIMEOUT..." on the server's log box while the port is "stuck". The server will try to disconnect every 15 seconds until finally the port is freed and it will return to Listening status. On Windows, it will return immediately to Listening with no errors.
http://bugs.winehq.org/show_bug.cgi?id=21420
--- Comment #1 from razorwings18@hotmail.com 2010-01-19 14:39:18 --- Addendum (sorry!): You may also click FORCE CLIENT DISCONNECT on the SERVER app for the same results.
http://bugs.winehq.org/show_bug.cgi?id=21420
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=21420
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2010-01-20 12:23:10 --- This is a Linux kernel feature, or a Windows bug, depending on your point of view. The problem is, a listening socket, after being asked to close, may not reenter the listen state until the TIME_WAIT state has passed. The Linux kernel folks have no intention of changing this, and Wine can't do anything about it. You'll need to change your application to avoid it.
In any event, it's not a Wine bug, so marking invalid...
http://bugs.winehq.org/show_bug.cgi?id=21420
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Juan Lang juan_lang@yahoo.com 2010-01-20 12:23:33 --- and closing.