diff --git a/Lib/plat-win/socket.py b/Lib/plat-win/socket.py index 7e1b3727b22..645d01e32fd 100755 --- a/Lib/plat-win/socket.py +++ b/Lib/plat-win/socket.py @@ -27,7 +27,7 @@ def __init__(self, sock): self._sock = sock def close(self): - self._sock = None + self._sock = 0 def __del__(self): self.close() @@ -68,7 +68,7 @@ def close(self): if self._sock: self.flush() finally: - self._sock = None + self._sock = 0 def __del__(self): self.close()