Giter Site home page Giter Site logo

ECONNREFUSED about onvif HOT 6 CLOSED

agsh avatar agsh commented on July 28, 2024 1
ECONNREFUSED

from onvif.

Comments (6)

agsh avatar agsh commented on July 28, 2024 2

I strongly agree with you, this wasn't my patch, missed this out. Replaced console.error with callbacks but saved if cases for debugging purposes ce1e4eb

from onvif.

kruschid avatar kruschid commented on July 28, 2024

Same problem here. Instead of printing the error to console in some cases, the script should call the callback function for every case, right? Might be useful for debugging but it isn't in production mode. :-(

Cam.js: lines 185 - 193

/* address, port number or IPCam error */
if (err.code === 'ECONNREFUSED' && err.errno === 'ECONNREFUSED'  && err.syscall === 'connect') {
    console.error(err);  
/* network error */
} else if (err.code === 'ECONNRESET' && err.errno === 'ECONNRESET'  && err.syscall === 'read') {
    console.error(err);
} else {
    callback(err);
}

from onvif.

kruschid avatar kruschid commented on July 28, 2024

thank you ;-)

from onvif.

bluet avatar bluet commented on July 28, 2024

ah, sorry for that.
I asked @sunnyworm to send PR if he fixed the connection refuse bug with a broken firmware on one of our IPcam, but I forgot to do code review...
https://github.com/agsh/onvif/blame/fbf1cf9a7e165a440d9193f6804669d815f822f4/lib/cam.js#L186

Will mention this to him and prevent any further bug like this.
Thanks @agsh for fixing!

from onvif.

scriby avatar scriby commented on July 28, 2024

Ran into this today as well, thanks for fixing.

Can we get this released on npm?

from onvif.

agsh avatar agsh commented on July 28, 2024

Done! 0.4.3

from onvif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.