mirror of
https://github.com/syncthing/syncthing.git
synced 2026-04-16 12:27:51 -04:00
The read/write loops may keep going for a while on a closing connection with lots of read/write activity, as it's random which select case is chosen. And if the connection is slow or even broken, a single read/write can take a long time/until timeout. Add initial non-blocking selects with only the cases relevant to closing, to prioritize those.