gok03 / rosjava

Automatically exported from code.google.com/p/rosjava
0 stars 0 forks source link

Subscriber without any publishers - lots of new sockets #111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In org.apache.xmlrpc.webserver.Webserver, run() method: place some output 
after serverSocket.accept()
2. Start a rosjava-RosCore, and register a subscriber on a non-published topic. 
(rostopic echo /foo)
3. You should see lots of sockets being created, with increasing port numbers.

What is the expected output? What do you see instead?
This behaviour seems a little radical. I'm not sure whether it's really a bug, 
however it doesn't seem to be resource-friendly.

What version of the product are you using? On what operating system?
rosjava is running under Windows 7, the rostopic echo call comes from an Ubuntu 
Oneiric with ROS electric installed.

Original issue reported on code.google.com by mate.wol...@gmail.com on 10 May 2012 at 2:44

GoogleCodeExporter commented 9 years ago
Could you clarify step 1? I'm not sure I understand what is creating the 
sockets?

Original comment by damonkoh...@google.com on 10 May 2012 at 2:53

GoogleCodeExporter commented 9 years ago
There is a line "Socket socket = serverSocket.accept()" in the WebServer.run() 
method. I've got some debug output after this line to see how often the web 
server has to handle a new connection. This happens quite often in the case 
mentioned above (about 10 times per sec), raising the question whether it's 
normal behavior or not.

Original comment by mate.wol...@gmail.com on 10 May 2012 at 3:13

GoogleCodeExporter commented 9 years ago
I suspect this is something that rostopic is doing. I'll look into it.

Original comment by damonkoh...@google.com on 10 May 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Ok, thanks, however: I didn't find this maybe-bug using rostopic, but by using 
regular self-implemented nodes (mainly rosjava nodes) - I used rostopic echo 
really just for reproducing this behavior.

Original comment by mate.wol...@gmail.com on 10 May 2012 at 3:21