Skip to content

Commit d94724c

Browse files
authored
Merge pull request #2082 from coolqingcheng/master
修复数据库无法连接的时候,codefirst的HasData会导致SyncStructure迁移死循环调用,然后Stackoverflow异常
2 parents 443d37b + 3e6aa05 commit d94724c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

FreeSql.DbContext/EfCoreFluentApi/EfCoreTableFluent`1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ public EfCoreTableFluent<T> HasData(IEnumerable<T> data)
340340
var sdCopyLock = new object();
341341
_fsql.Aop.SyncStructureAfter += new EventHandler<Aop.SyncStructureAfterEventArgs>((s, e) =>
342342
{
343+
if (e.Exception != null) return;
343344
object[] sd = null;
344345
lock (sdCopyLock)
345346
sd = sdCopy?.ToArray();

0 commit comments

Comments
 (0)