this patch adds unwind-protect around the socket code to prevent a bunch of loose sockets if there are exceptions.<br><br>-red<br>