ntalbott / mupnp Goto Github PK
View Code? Open in Web Editor NEWModernization fork of http://rubyforge.org/projects/mupnp
License: GNU Lesser General Public License v3.0
Modernization fork of http://rubyforge.org/projects/mupnp
License: GNU Lesser General Public License v3.0
I am seeing some strange behaviour, I have taken the code from one of the examples with a few extra puts statements:
require 'rubygems'
require 'UPnP'
puts "Before UPnP"
begin
u = UPnP::UPnP.new
puts "Internet IP #{u.externalIP}"
puts "Router Lan IP #{u.routerIP}"
dn,up = u.maxLinkBitrates()
puts "Max Link Bitrate #{dn}/#{up}"
s,e,ut = u.status
puts "Status #{s}"
puts "Uptime #{ut}"
puts "Connection type #{u.connectionType}"
rescue
puts "Exception Rescued"
end
puts "After Exception"
sleep 60
puts "After Sleep
When I run it I see:
$ bundle exec ruby test.rb
Before UPnP
#<Thread:0x00000000011c5c18@/data/deployer/timeagent/vendor/bundle/ruby/2.5.0/gems/mupnp-0.2.0/lib/UPnP.rb:105 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
1: from /data/deployer/timeagent/vendor/bundle/ruby/2.5.0/gems/mupnp-0.2.0/lib/UPnP.rb:105:in `block in initialize'
/data/deployer/timeagent/vendor/bundle/ruby/2.5.0/gems/mupnp-0.2.0/lib/UPnP.rb:141:in `discoverIGD': No IGD Found (UPnP::UPnPException)
Traceback (most recent call last):
1: from /data/deployer/timeagent/vendor/bundle/ruby/2.5.0/gems/mupnp-0.2.0/lib/UPnP.rb:105:in `block in initialize'
/data/deployer/timeagent/vendor/bundle/ruby/2.5.0/gems/mupnp-0.2.0/lib/UPnP.rb:141:in `discoverIGD': No IGD Found (UPnP::UPnPException)
$
The exception is not being rescued and the application dies.
I'm using ruby 2.5.3p105.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.