소스 검색

Server: Bugfix: Collection was modified in a non thread-safe way

Tal Aloni 5 년 전
부모
커밋
efa9499719
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 3
      SMBLibrary/Server/ConnectionState/SMB1ConnectionState.cs
  2. 3 3
      SMBLibrary/Server/ConnectionState/SMB2ConnectionState.cs

+ 3 - 3
SMBLibrary/Server/ConnectionState/SMB1ConnectionState.cs

@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
+/* Copyright (C) 2014-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  * 
  * You can redistribute this program and/or modify it under the terms of
  * the GNU Lesser Public License as published by the Free Software Foundation,
@@ -104,9 +104,9 @@ namespace SMBLibrary.Server
                 {
                     session.Close();
                 }
-            }
 
-            m_sessions.Clear();
+                m_sessions.Clear();
+            }
         }
 
         public override List<SessionInformation> GetSessionsInformation()

+ 3 - 3
SMBLibrary/Server/ConnectionState/SMB2ConnectionState.cs

@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
+/* Copyright (C) 2014-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  * 
  * You can redistribute this program and/or modify it under the terms of
  * the GNU Lesser Public License as published by the Free Software Foundation,
@@ -82,9 +82,9 @@ namespace SMBLibrary.Server
                 {
                     session.Close();
                 }
-            }
 
-            m_sessions.Clear();
+                m_sessions.Clear();
+            }
         }
 
         public override List<SessionInformation> GetSessionsInformation()