kylefarris / clamscan

A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
MIT License
230 stars 68 forks source link

Add check: if server closes the connection before PONG #95

Closed bruno-yamada closed 2 years ago

bruno-yamada commented 2 years ago

In some scenarios, the server can enter a state where even though it accepts connection, it closes it and doesn't reply with PONG when you send the PING

Specially when clamav has trouble downloading database updates (due to rate-limiting imposed by clam-av)

Working scenario: image

Scenario where it breaks: image (connection gets closed prematurely)

kylefarris commented 2 years ago

Thank you very much for your contribution! I've updated the NPM package to v2.1.0