-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Prevent deadlocks while communicating with ClamAV. (#38)
ClamAV wants us to read/write in a [non-blocking manner](https://manpages.debian.org/testing/clamav-daemon/clamd.8.en.html#IDSESSION,) to prevent deadlocks. If they think this happened, it closes the connection, which results in a broken pipe error on send. We need to peek into the socket buffer to make sure we can write/read from it, using [IO#select](https://www.rubydoc.info/stdlib/core/IO.select) for that.
- Loading branch information
1 parent
ce42d9a
commit a221a28
Showing
4 changed files
with
54 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters