fix for memory leak from @jonasi plus test

Here you go, a test.  This issue is totally trivially reproducible with this test (if you change the # of connections to thousands with a large message you can even watch it eat up memory on your machine).   Please merge ASAP.