Re: tcludp - bug when closing 1-of-2 listening ports



Alexandre Ferrieux schrieb:
So *if* it is blocking in [read] in the second handler, it is a bug.

Meanwhile I am one step forward.

After closing the first port, the Socket Thread blocks in
WaitForSingleObject(waitSockRead, INFINITE);
since it has the notification of an pending (empty?) packet after exit (port 1300 has: statePtr->packetNum > 0, but the packet is not read yet).

The worker thread awaits an
statePtr->packetNum > 0
before it sends the event
SetEvent(waitSockRead);
But after close, port 1300 is deleted from list and there is NO port with "statePtr->packetNum > 0" left and so the worker thread does not send the event and the socket thread waits forever.

Unfortunately only the socket thread set "statePtr->packetNum".


So far, so complicate.

Any idea, where the pending packet after "exit" can come from?
Or how to overcome the dilemma?

Tomorrow I will try XP SP2 with little hope.

--
Vera
.