Hello,

I need your help.
I want to get the public IP address of my Beaglebone via ifconfig.me.

If I have an existing internet connection it works fine. If I don't have an 
internet connection the request should be aborted. 
Here is my code:
*function publicIP_www(callback){*
*  try{*
*     exec('curl ifconfig.me',{timeout:3000, killSignal:'SIGKILL'}, 
function(error, stdout, stderr){ *
*     callback(stdout); }); *
*  } *
*  catch (err){*
*     callback("000.000.000.000");*
*  }*
*}*

The returned IP address is then displayed on a web site in the browser. 
If there is no internet connection, the browser calculates forever. It 
seems as if the call exec ...... is not terminated.

I'm looking forward to your support and hope that someone can tell me what 
I'm doing wrong.

best regards 
Hans

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/b8426f4c-ffbb-48ca-ae07-d7a5be666fbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to