Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
upnp-basedriver-0.8.0
-
None
Description
Under Linux Systems every Socket uses a "file descriptor" in the system
which is in most unix systems default value of 1024 max descriptors.
Now i tried to push that value to 65535 and vuala everything is running > 8
hours.
If i check my open file descriptors with lsof -p pidofmyjavaprogram i see
now MANY open ports that have not been closed properly (right now > 1400 for
10 hours of operation).
Ok..that made me let a bit deeper into the code of cyberlink library.
I saw a fix that was introduced by someone because of "non-closed" ssdp udp
sockets in the announce method of org/cybergarage/upnp/Device.java
1240 SSDPNotifySocket ssdpSock = new SSDPNotifySocket(bindAddr);
1241
1242 SSDPNotifyRequest ssdpReq = new SSDPNotifyRequest();
1243 ssdpReq.setServer(UPnP.getServerName());
1244 ssdpReq.setLeaseTime(getLeaseTime());
1245 ssdpReq.setLocation(devLocation);
1246 ssdpReq.setNTS(NTS.ALIVE);
1247
1248 // uuid:device-UUID(::upnp:rootdevice)*
1249 if (isRootDevice() == true)
1261
1262 //
uuid:device-UUID::urn:schemas-upnp-org:device:deviceType:v
1263 String devNT = getNotifyDeviceTypeNT();
1264 String devUSN = getNotifyDeviceTypeUSN();
1265 ssdpReq.setNT(devNT);
1266 ssdpReq.setUSN(devUSN);
1267 ssdpSock.post(ssdpReq);
1268
1269 // Thanks for Mikael Hakman (04/25/05)
1270 ssdpSock.close();
Ok seems fine so far...
Ok now i looked into org/cybergarage/upnp/Service.java and there the "socket
close fix" was NOT introduced for both announce and byebye.....
599 public void announce(String bindAddr)
600
622 public void byebye(String bindAddr)
623
kind regards,
Daniel