-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix multiple TLS records in buffer #2890
base: master
Are you sure you want to change the base?
Conversation
It seems to work more often than before, but not always. Attached a log with a failed download. |
@jcorporation I can't reproduce this. With this patch I get 20 out of 20 correct downloads, 107586 |
Tried it again. Most times it works, but sometime it fails. I freshly cloned latest master and merged the tls branch. |
I could reproduce it 1 in a 1000 tries... |
My failure rate is much higher. I tested with a wlan client. I will repeat my tests with lab and report back. You tested with the url from my last tests? |
Yes, 10000 iterations 10 failures |
I tested the same example with mongoose 7.14 and the error is gone. It seems to be a regression introduced in mongoose 7.15. |
Even though we receive IO_ERR, several outstanding TLS records can lie in our buffer. One or two extra calls is not enough to correctly process them and cleanly close.
NOTE: is_io_err becomes unused, will be removed further on if this proves to be the final battle.
#2885