提交 9c3feea7 编写于 作者: H Heejae Chang

put dispose under finally.

上级 2fe6f382
......@@ -191,6 +191,21 @@ private void ReleaseConnection(SqlConnection connection)
}
public override void Close()
{
// Flush all pending writes so that all data our features wanted written
// are definitely persisted to the DB.
try
{
CloseWorker();
}
finally
{
// let the lock go
_dbOwnershipLock.Dispose();
}
}
private void CloseWorker()
{
// Flush all pending writes so that all data our features wanted written
// are definitely persisted to the DB.
......@@ -216,9 +231,6 @@ public override void Close()
connection.Close_OnlyForUseBySqlPersistentStorage();
}
}
// let the lock go
_dbOwnershipLock.Dispose();
}
private PooledConnection GetPooledConnection()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册