projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for bug 22307 - Intermittent IndexOutOfRangeException on closing connection
[mono.git]
/
mcs
/
class
/
System.ServiceModel
/
System.ServiceModel.Dispatcher
/
ChannelDispatcher.cs
diff --git
a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
index 15731e65a3a594d4909d5bdf3a59236debb2f5ab..10834fc0ae81deafcb1f22b0a54bd2ab3f12b939 100644
(file)
--- a/
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
+++ b/
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
@@
-452,8
+452,11
@@
namespace System.ServiceModel.Dispatcher
public void CloseInput ()
{
foreach (var ch in channels.ToArray ()) {
public void CloseInput ()
{
foreach (var ch in channels.ToArray ()) {
- if (ch.State == CommunicationState.Closed)
- RemoveChannel (ch);
+ if (ch.State == CommunicationState.Closed) {
+ lock (channels) {
+ RemoveChannel (ch);
+ }
+ }
else {
try {
ch.Close (close_timeout - (DateTime.Now - close_started));
else {
try {
ch.Close (close_timeout - (DateTime.Now - close_started));