in reply to Re: Re: thread:shared
in thread thread:shared
The bigger problem, which I see, is the way the server crashes when you close all clients, then restart them, and try to print something from client 1. It only affects client1.
I have found a fix for this, but it was just by my "intuitive guessing", so I can't say what overall effect it will have. But.......if you don't detach the reader and writer threads, the crash problem goes away.(as far as my limited testing has shown). So comment out:
# $r->detach(); # $w->detach();
Maybe that will help your problem. Thanks again for the code. This is the first threaded-chat code I could find.
|
|---|