diff options
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Ice/IPEndpointI.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/csharp/src/Ice/IPEndpointI.cs b/csharp/src/Ice/IPEndpointI.cs index d04b5d91d54..3d3c280f6b7 100644 --- a/csharp/src/Ice/IPEndpointI.cs +++ b/csharp/src/Ice/IPEndpointI.cs @@ -243,14 +243,17 @@ namespace IceInternal public override int GetHashCode() { - if(!_hashInitialized) + lock (this) { - _hashValue = 5381; - HashUtil.hashAdd(ref _hashValue, type()); - hashInit(ref _hashValue); - _hashInitialized = true; + if(!_hashInitialized) + { + _hashValue = 5381; + HashUtil.hashAdd(ref _hashValue, type()); + hashInit(ref _hashValue); + _hashInitialized = true; + } + return _hashValue; } - return _hashValue; } public override int CompareTo(EndpointI obj) |