Using Onvif events in a node app leads to infrequent unhandled exeptions as follows:
Error: You should create pull-point subscription first!
at Cam.pullMessages (/home/pi/backend/node_modules/onvif/lib/events.js:188:10)
at Cam._eventPull (/home/pi/backend/node_modules/onvif/lib/events.js:308:9)
at Cam.<anonymous> (/home/pi/backend/node_modules/onvif/lib/events.js:100:13)
at parseSOAPString (/home/pi/backend/node_modules/onvif/lib/utils.js:108:3)
at IncomingMessage.<anonymous> (/home/pi/backend/node_modules/onvif/lib/cam.js:270:4)
at IncomingMessage.emit (events.js:327:22)
at IncomingMessage.EventEmitter.emit (domain.js:483:12)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Changes:
In line 289 an additinal check regarding events.subscription is introduced, since pullMessages will throw otherwise.
Coverage remained the same at 87.978% when pulling b317c12c14b464cbf615a4d0475e6e92f9c2b439 on sjkummer:bugfix/fix-uncaught-exception-while-pulling-events into 2cdafa0130758a31a7c97df0b3c53d50a2f86d15 on agsh:master.
Using Onvif events in a node app leads to infrequent unhandled exeptions as follows:
Changes:
pullMessages
will throw otherwise.