offbynull / portmapper

Java library that maps ports on NAT-enabled routers (supported protocols: UPnP-IGD/NAT-PMP/PCP).
Apache License 2.0
88 stars 17 forks source link

upnp throw java.lang.IllegalStateException #41

Closed leasontou closed 5 years ago

leasontou commented 5 years ago

I use UpnpIgdPortMapper,but throw a java.lang.IllegalStateException when call a mapPort,this is my log java.lang.IllegalStateException: null at com.offbynull.portmapper.mappers.upnpigd.PortMapperUpnpIgdPortMapper.oldMapPort(PortMapperUpnpIgdPortMapper.java:276) at com.offbynull.portmapper.mappers.upnpigd.PortMapperUpnpIgdPortMapper.mapPort(PortMapperUpnpIgdPortMapper.java:134) at leason.core.nat.NatClient.$anonfun$addMapping$1(NatClient.scala:23) at cats.effect.internals.IORunLoop$.step(IORunLoop.scala:176) at cats.effect.IO.unsafeRunTimed(IO.scala:321) at cats.effect.IO.unsafeRunSync(IO.scala:240)

btw,I test mapPort using NatPmpPortMapper,the log shows success,but I can't telnet the port,I'm a little confused...

offbynull commented 5 years ago

Sorry, I don't have the time to devote to this project anymore. You're welcome to debug the issue yourself and submit a patch.