This repository was archived by the owner on Nov 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/Microsoft.AspNetCore.Session Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public class DistributedSession : ISession
30
30
private readonly ILogger _logger ;
31
31
private bool _isModified ;
32
32
private bool _loaded ;
33
+ private bool _isAvailable ;
33
34
private bool _isNewSessionKey ;
34
35
private string _sessionId ;
35
36
private byte [ ] _sessionIdBytes ;
@@ -71,7 +72,13 @@ public DistributedSession(
71
72
_isNewSessionKey = isNewSessionKey ;
72
73
}
73
74
74
- public bool IsAvailable { private set ; get ; }
75
+ public bool IsAvailable
76
+ {
77
+ get
78
+ {
79
+ return _isAvailable ;
80
+ }
81
+ }
75
82
76
83
public string Id
77
84
{
@@ -206,12 +213,12 @@ private void Load()
206
213
{
207
214
_logger . AccessingExpiredSession ( _sessionKey ) ;
208
215
}
209
- IsAvailable = true ;
216
+ _isAvailable = true ;
210
217
}
211
218
catch ( Exception exception )
212
219
{
213
220
_logger . SessionCacheReadException ( _sessionKey , exception ) ;
214
- IsAvailable = false ;
221
+ _isAvailable = false ;
215
222
}
216
223
finally
217
224
{
@@ -235,7 +242,7 @@ public async Task LoadAsync()
235
242
{
236
243
_logger . AccessingExpiredSession ( _sessionKey ) ;
237
244
}
238
- IsAvailable = true ;
245
+ _isAvailable = true ;
239
246
_loaded = true ;
240
247
}
241
248
}
You can’t perform that action at this time.
0 commit comments