aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
Diffstat (limited to 'netlib')
-rw-r--r--netlib/tcp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 0d83816b..5c9d26de 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -352,6 +352,9 @@ class Address(object):
def __ne__(self, other):
return not self.__eq__(other)
+ def __hash__(self):
+ return hash(self.address) ^ 42 # different hash than the tuple alone.
+
def close_socket(sock):
"""