From 27a2c57e8a69823a1ae62725f32c464ff707a743 Mon Sep 17 00:00:00 2001 From: Geoff Gustafson Date: Wed, 30 Aug 2017 10:49:30 -0700 Subject: [PATCH] [samples] Fix TCPClient6.js sample to check for right error name Signed-off-by: Geoff Gustafson --- samples/TCPClient6.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/TCPClient6.js b/samples/TCPClient6.js index 7963cb823..c2d7c6577 100644 --- a/samples/TCPClient6.js +++ b/samples/TCPClient6.js @@ -60,7 +60,7 @@ net_cfg.on('netup', function() { console.log("Socket has closed"); }); client.on("error", function(err) { - if (err.name == "NotFoundError") { + if (err.name == "Error") { console.log("Server not found, retrying in 2 seconds"); setTimeout(function() { if (!is_connected) {