TCP connection should not crash the program if they are closed from within a finalizer. Instead, give a warning if such a class has leaked. (cherry picked from commit 2c0adbc56170571991781cebf1e3aac1549828ad)