Fix LogEntries: collection was modified exception (#309)

* _options.LogEntries.ToArray()

* .

* update error message
This commit is contained in:
Stef Heyenrath
2019-08-10 16:46:53 +02:00
committed by GitHub
parent 19dd9e113e
commit 65688ee7d3
9 changed files with 44 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ namespace WireMock.Server
/// Gets the request logs.
/// </summary>
[PublicAPI]
public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries);
public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries.ToArray());
/// <summary>
/// The search log-entries based on matchers.