X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=6ea8910d8d669860c72e20805c9a7f92b6637b4b;hb=dfad8457017003a53ac4449456e632439fdb3235;hp=b2e0f154868bb1377b418c6595d40472506d35b4;hpb=3528d97bca02191cea884af5154e23ad666d0003;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index b2e0f15..6ea8910 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.63 2007-02-22 15:43:13 mike Exp $ +# $Id: IRSpy.pm,v 1.64 2007-02-22 17:46:23 mike Exp $ package ZOOM::IRSpy; @@ -427,14 +427,19 @@ sub check { eval { $conn->_check() }; if ($@ && ($ev == ZOOM::Event::RECV_DATA || - $ev == ZOOM::Event::ZEND)) { + $ev == ZOOM::Event::ZEND || + ($ev == ZOOM::Event::RECV_APDU && + !$task->isa("ZOOM::IRSpy::Task::Connect")))) { # An error in, say, a search response, becomes visible to # ZOOM before the Receive Data event is sent and persists # until after the End, which means that successive events # each report the same error. So we just ignore errors on - # "unimportant" events. ### But this doesn't work for, - # say, a Connection Refused, as the only event that shows - # us this error is the ZEND. + # "unimportant" events. We can also ignore errors on + # RECV_APDU in most cases, but since there is no RECV_INIT + # event, we need to avoid doing this if the task is + # Connect. Yuck -- special cases. + # ### But this doesn't work for, say, a Connection Refused, + # as the only event that shows us this error is the ZEND. $conn->log("irspy_event", "ignoring error ", "on event $ev ($evstr): $@"); next;