Fixed bug #80723 This fixes the issue just for the Socket class. Presumably we'll want to do the same for other "resource" objects.