complete OOIION-987 : now also use remove_endpoint(sub) (instead of sub.close()) as it seems to be working now ok.
merge upstream/master
Merge pull request #1328 from carueda/2013-09-18_OOIION-987

complete OOIION-987 : now also use remove_endpoint