minor socket cleanups