diff --git a/netlib/tcp.py b/netlib/tcp.py index 0d83816b1..5c9d26de4 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): """