But it has some problem,when the client close the connection, some time the server will be crash.
I don't know why,please check my code,and tell me the bug I had,thanks
source code: http://hunter.gnuchina.org/mt_chat.tgz
My linux box is slackware 8.0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But it has some problem,when the client close the connection, some time the server will be crash.
I don't know why,please check my code,and tell me the bug I had,thanks
source code:
http://hunter.gnuchina.org/mt_chat.tgz
My linux box is slackware 8.0
I note a code like (user.cpp)
delete this;
m_bDisconnecting = true;
This can be the problem. What version of cc++ do you use?
freddy77
g++ -v
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)
ok,I had removed that line,I think it will more
stably now :)