Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue whem writing to log file, and gathering data from other data sources #13

Open
TheRealRedRiver559 opened this issue May 25, 2023 · 2 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@TheRealRedRiver559
Copy link
Owner

When writing to the log file, there can be an issue where something might try and read while also be writing. There might have to be some sort of lock implemented to make sure it doesn't happen.

Same issue with gathering the clients from client.values()
A new user may join or leave when trying to gather this data. I could just make a copy and use that data but I'm not entirely sure on the efficiency and other workarounds.

@TheRealRedRiver559 TheRealRedRiver559 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels May 25, 2023
@TheRealRedRiver559
Copy link
Owner Author

Can probably use some sort of queue or stack to push updates from the server. I can them grab the newest data piece from the stack or queue and use that. Just needs implemented now. Probably won't add this until a later date when it's needed more with traffic

@TheRealRedRiver559
Copy link
Owner Author

There is also another issue with the commands file and the server file grabbing data from the clients dict. For some reason when changing line 27, and 28 in the Server.py to a non-copy of the clients dict, it clears the entire commands.py clients dict. This is odd since no changes ae being done. It only happens when a user logs in and calls a command like //help. The only thing that has access at that time are for broadcasts and sending out TCP SYN or ACK messages. making it a copy doesnt make any sense to me besides conflicting changes but it works for some reason. I think adding a queue would fix this issue, but it could be because of logic or some other reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant