diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2018-03-18 05:59:23 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2018-03-18 05:59:23 +0300 |
commit | c00c6fd19b1170b9df9d47ba762517d8ef6bde15 (patch) | |
tree | 0302849928e8345fcf0d3fc38510e32e01a98ab5 /Duplicati/Server/EventPollNotify.cs | |
parent | 883922e2f3437ddffc9321dca097a9515ece0171 (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/Server/EventPollNotify.cs')
-rw-r--r-- | Duplicati/Server/EventPollNotify.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/Server/EventPollNotify.cs b/Duplicati/Server/EventPollNotify.cs index 2004aa00a..83e853252 100644 --- a/Duplicati/Server/EventPollNotify.cs +++ b/Duplicati/Server/EventPollNotify.cs @@ -13,7 +13,7 @@ namespace Duplicati.Server /// <summary>
/// The lock that grants exclusive access to control structures
/// </summary>
- private object m_lock = new object();
+ private readonly object m_lock = new object();
/// <summary>
/// The current eventID
/// </summary>
|