lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [4/5] lucenenet git commit: BUG: Lucene.Net.Replicator.LocalReplicator.ObtainFile(): Fixed KeyNotFoundException issue with sessions dictionary.
Date Fri, 15 Sep 2017 04:02:53 GMT
BUG: Lucene.Net.Replicator.LocalReplicator.ObtainFile(): Fixed KeyNotFoundException issue with
sessions dictionary.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/14059266
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/14059266
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/14059266

Branch: refs/heads/master
Commit: 140592662d48825aa48775b8b1ae70c130203eb2
Parents: b7c5f0b
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Sep 15 10:41:41 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Sep 15 10:41:41 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Replicator/LocalReplicator.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/14059266/src/Lucene.Net.Replicator/LocalReplicator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Replicator/LocalReplicator.cs b/src/Lucene.Net.Replicator/LocalReplicator.cs
index 349a088..5e6983a 100644
--- a/src/Lucene.Net.Replicator/LocalReplicator.cs
+++ b/src/Lucene.Net.Replicator/LocalReplicator.cs
@@ -237,8 +237,8 @@ namespace Lucene.Net.Replicator
             {
                 EnsureOpen();
 
-                ReplicationSession session = sessions[sessionId];
-                if (session != null && session.IsExpired(ExpirationThreshold))
+                ReplicationSession session;
+                if (sessions.TryGetValue(sessionId, out session) && session != null
&& session.IsExpired(ExpirationThreshold))
                 {
                     ReleaseSession(sessionId);
                     session = null;


Mime
View raw message