Closed igroglaz closed 2 years ago
Fixing this "Could not accept TCP Connection, socket error = 0" problem has been in the backlog forever (got the line in my roadmap file for like 5 years), but I've never been able to track down the cause. Looking at my code in Contact(), I've noted that this probably only happens when the server is run in debug mode, which is the case for T. Since errno = 0 makes no sense, I'll simply remove the message.
After I've added in T account_score system after each death when there are several players online I see in the logs hundreds (or thousands) lines in the code likes this:
At first when I've implemented account_score in simple way - I had such output (a lot of Could not accept TCP Connection, socket error = 0) even when there wasn't players online... So I've added file_lock(lok); (https://github.com/igroglaz/Tangaria/commit/53abcc3732140d4b501436817ad5b79b5d7d0f03) to account_score and it become much better... but still if there are players on server and they make a lot of action such 'spam' appears.
AFAIU this is pure cosmetic problem, but still will be fun to fix it. I wonder, maybe we can add something like
to prevent a lot of similar messages in the log? Or maybe there is some other way to improve it?
Also rarely such messages appears in other cases, eg:
...but not in such quantities like after player RIP :)