Strange socket error

Bob Cowdery bob at bobcowdery.plus.com
Wed Dec 22 02:14:53 PST 2010


On 22/12/2010 10:04, "Jérôme M. Berger" wrote:
> Bob Cowdery wrote:
>> The listner is a single thread that creates an instance of my web socket
>> class for each connection. I'm not trying to support lots of users, most
>> of the time just one. The listner code is almost the same as the sockets
>> example. If you or anyone else can spare a few moments the code can be
>> browsed at http://code.google.com/p/dcsdr/source/browse
>> (branches/linux/DcSdr/WsServer/listener.d). The trunk is the Windows
>> version. I'd be very happy if it's something I'm doing wrong.
>>
> 	I looked at your code and I don't see what could cause this issue.
> Sorry.
>
> 	I did however find a bug: when a client connection is closed, you
> remove the corresponding socket from reads but you don't remove the
> WebSocket from wsset...
>
> 		Jerome
Thanks for looking and pointing out the bug. That could be causing some
odd connection issues I see when I have to restart things. I didn't
expect it to be a simple coding fault as it goes away when I stop
unrelated threads. I guess my next step is to try and reproduce with the
minimum of code.

bob


More information about the Digitalmars-d-learn mailing list