-
Notifications
You must be signed in to change notification settings - Fork 13
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
Sending buffer bug after network fail #6
Comments
Thank you for comment! The problem is looks simple, the UDP socket is flagged "broken" by OS. I think two solution. First of all, you should write down you env and check OS logs you can. I also need to fix, exception on |
Sorry, i forgot. [Linux 5.15.0-58-generic][Linux Mint 20.04][x86_64] I think the best option is to lock the socket, since we are dealing with communication with ACK packets, I think it would be the most "standard" idea. |
Also, i wrote a small test to check for this behavior: CODE SIDE A:
CODE SIDE B:
OUTPUT SIDE A:
OUTPUT SIDE B:
As can be seen, the data stream becomes unstable in terms of both the data and the behavior of the program. |
I'm reading code after 2 years. I tested your simple debug code, I can't reproduce your errors, but add some fix. |
I really dont know, im using Python 3.9.16, maybe some threading behavior changed? Im out of ideas, if i "manually" sleep for a couple of ms it works perfect, but if i just "while True" seems like the software isnt capable of handling the data-flow and when the send_buffer gets full starts sending random bytes from the top of the buffer (?) if you can provide me with some idea to just add a variable "bool sending" to lock the buffer input while sending i can implement it. Thanks for your reply. |
I find bug in my code. https://github.com/namuyan/srudp/blob/master/srudp/__init__.py#L587 I need fix logics, it will take some time to fix. |
86a77d1 memo: |
Hey, very cool project! Today i was testing the code in a long run, and this happend:
The "Network is unreachable" it is intentional, i was testing how the code would behave in the case of that happening.
But the wired thing comes after:
Something wierd happend in the middle and i cant figure what, any idea?
Again, very good project, very good code structure, i will upload some PRs to contribute.
~ uint69_t
The text was updated successfully, but these errors were encountered: