etcimon / botan

Block & stream ciphers, public key crypto, hashing, KDF, MAC, PKCS, TLS, ASN.1, BER/DER, etc.
Other
85 stars 22 forks source link

break from read loop when underlying sockets is drained #15

Closed MartinNowak closed 7 years ago

MartinNowak commented 7 years ago

This should fix a bug where an application of mine gets regularly stuck in a busy loop, b/c a requested remote server ends the connection early.

etcimon commented 7 years ago

Thanks

MartinNowak commented 7 years ago

Empirically approved to solve the problem after several weeks w/o further busy locks.

etcimon commented 7 years ago

Good, I also had an issue with a busy loop here: https://issues.dlang.org/show_bug.cgi?id=16641 and when returning 0 from read here: https://github.com/etcimon/vibe.0/commit/2e78a93cf0381ddd3acc6823b9f9a05c7e7a293d#diff-e8a2fb8b250e93ebede4ffc01c2c0741R342 and here: https://github.com/etcimon/botan/commit/7663bea85829a136fd456d0689ac204e99fa2528#diff-fecfb5991c6f6086c030d831fb5db1b8R119