> I know this isn't directly an ASSP issue, but I'm wondering
> if there may be some workaround to the above situation

found an answer by myself looking at the sources for the
File::Scan::ClamAV module; the "ping()" method doesn't
allow to specify a timeout; so here's what happens

the client (ASSP in our case) calls the ping method to
check if ClamD is active

the ping method opens a socket to ClamD and till now
all ok (the connection is established)

then the ping method sends a string (PING) on the
socket and waits "forever" to receive a "PONG"
answer or until the connection gets closed and
THIS causes the issue

While ClamD reloads the signatures or performs
internal checks, it doesn't answer to command but
still accepts connections; any command sent during
those intervals will be accepted but will stay queued
and hold until the "blocking operation" (e.g. reload)
completes, then clamd will dequeue commands and
answer/process them

Now, a possible workaround would be avoiding the
use of the "ping()" method at all and implementing a
custom routine which will connect to the clamd socket
and send a "PING" but WITH a given timeout, so that
if clamd won't answer the timeout will expire and we'll
assume it isn't available (at the moment) all this will
then avoid the ASSP "blocking" (waiting for ClamD
to answer)


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to