Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: read ECONNRESET #12

Open
DynWebService opened this issue Nov 9, 2017 · 5 comments
Open

Error: read ECONNRESET #12

DynWebService opened this issue Nov 9, 2017 · 5 comments

Comments

@DynWebService
Copy link

Hello,

I recently implemented an adapter for a device, but eventually the node stops the error below:
`
events.js:160
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TCP.onread (net.js:568:26)
`

Can you help me?

@vcianaya
Copy link

Hello, I have the same problem, did you solve it ???

@maykonmultilig
Copy link

Hello,

Yes, i just add the follow lines in my server.js:

    connection.on('error', function (data) {
       //error handling here 
    })

in my case i just ignore this.

connection.on('error', function (data) {
        console.log("Connection Error: ");
        console.log(data);
       // device.error(data, 'Connection error');
    });

my server.js

var server = gps.server(options,function(device, connection){

    device.on("login_request",function(device_id, msg_parts){
        if (device_id < 0) {
            this.login_authorized(false);
        } else {
            this.login_authorized(true);
        }

    });

    //PING -> When the gps sends their position  
    device.on("ping",function(data){
        return data;
    });

    connection.on('error', function (data) {
        console.log("Connection Error: ");
        console.log(data);
       // device.error(data, 'Connection error');
    });

});

@gdespirito
Copy link
Member

Do you have some code example so I can test the problem?

@vcianaya
Copy link

vcianaya commented May 11, 2018

image

That error comes out

@GokulanJayaram
Copy link

What is the best way to resolve this than just ignoring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants