Lorenzo is seeing some problems closing a port when an incoming mcast connection is flakey. He found that the problem can be made more replicable by reducing the system buffer size:
>If I run the same test on my laptop (Linux Ubuntu) things work ok. However I manage to replicate the problem with the framerate (the fact that it does not shutdown correctly), if I reduce the receiver buffer.
> with:
> sudo /sbin/sysctl net.core.rmem_max=51200
> or
> sudo /sbin/sysctl net.core.rmem_max=40960
> I see more and more packets being lost, but the program still quits ok.
> when I go down to 30720 I start see the problem I described above.
Full test-case for Linux, where "framerate" is from example/framerate in YARP CVS on or after today's date:
sudo /sbin/sysctl net.core.rmem_max=4000
yarp server
yarpdev --device test_grabber # gives 320x240 images on port /grabber
./framerate --local /local --remote /grabber --prot mcast
killall framerate
(use new terminals as necessary).
With "--prot mcast", port fails to close on kill.
With "--prot tcp", port closes just fine.
-Paul