Fixes a leak of connection objects when using asio transport references #310