Correct some proxy related socket leaks.