Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2018-03-18 05:59:23 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2018-03-18 05:59:23 +0300
commitc00c6fd19b1170b9df9d47ba762517d8ef6bde15 (patch)
tree0302849928e8345fcf0d3fc38510e32e01a98ab5 /Duplicati/Library/Logging
parent883922e2f3437ddffc9321dca097a9515ece0171 (diff)
Make fields containing lock objects readonly.
If one of these fields is accidentally reassigned, it's possible for threads to be oblivious to an existing lock. By making the fields readonly, we will be notified at compile-time if we inadvertently redefine one of these fields.
Diffstat (limited to 'Duplicati/Library/Logging')
-rw-r--r--Duplicati/Library/Logging/Log.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/Library/Logging/Log.cs b/Duplicati/Library/Logging/Log.cs
index 0ec235b98..7346a95f4 100644
--- a/Duplicati/Library/Logging/Log.cs
+++ b/Duplicati/Library/Logging/Log.cs
@@ -85,7 +85,7 @@ namespace Duplicati.Library.Logging
/// <summary>
/// Static lock object to provide thread safe logging
/// </summary>
- private static object m_lock = new object();
+ private static readonly object m_lock = new object();
/// <summary>
/// Gets the lock instance used to protect the logging calls