lordloki / EasyOnline

4 stars 1 forks source link

the dead client will still remain in the server and other clients #1

Open imfeizhu opened 2 years ago

imfeizhu commented 2 years ago

Thanks, it's very useful for develop! There is a problem. After the client close or exits abnormally, the dead client will still remain in the server and other clients, or I will still see the previous ones after I log in again. Is there any good way to clear these dead clients?

q

The functions :

if now - ce.socket_processor.lastTcpReceive > self.config.timeout: ce._shutdown(REASON_TIMEOUT) self._disconnect_client(ce, REASON_KICK)

in network.py do not work.

and i use:

if now - ce.socket_processor.lastTcpReceive > self.config.timeout: self.clients.remove(ce) self.updatePlayerCount(-1)

can only clean up the online num and list, Thank you.

imfeizhu commented 2 years ago

i found it worked fine in bpg3.0,errors in 3.3

lordloki commented 2 years ago

I open again to check in current upbge 0.33