-
Notifications
You must be signed in to change notification settings - Fork 38
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
Bugfixes and Improvements #23
base: master
Are you sure you want to change the base?
Conversation
allow chunk size to be specified
set socket timeout before connect
We are observing a similar issue, where python-clamd sends an incomplete |
Regarding If I understand the clamd protocol correctly, then |
@graingert - do you have any space to look at this PR? The change-set fixes what is (for us) a major and intermittent bug, and it would be great to be using |
- use sendall() instead of send() - allow custom max_buffer_size - set socket timeout before connect Thanks to @mrname
- use sendall() instead of send() - allow custom max_buffer_size - set socket timeout before connect Thanks to @mrname
* apply changes from graingert#23 (#8) - use sendall() instead of send() - allow custom max_buffer_size - set socket timeout before connect Thanks to @mrname * Add CI, code quality improvements, fix tests * Don't run pytest in CI since there's no clamd Co-authored-by: Steve Pike <[email protected]>
Although a few forks have been created (https://pypi.org/project/pyClamd/, https://github.com/ranguli/clammy), they now seem unmaintained (last one was archived recently). I've made yet another fork here: https://github.com/Viicos/clamdpy. Improvements from this PR have been included, and type hints are included. Credit goes to https://github.com/graingert/python-clamd/ |
A few bugfixes and improvements:
send
tosendall
. This ensures that the entire message is pushed in the socket call. In our use case, NOT usingsendall
caused an issue when usingclamd
in association withgevent
, since each socket message may or may not have pushed the full chunk, and they are working cooperatively. Aside from this use case, it also proved to be a more efficient way to send the socket messages.