Skip to content

Commit e4ccc77

Browse files
Do not call flushBuffers on exitApplication if object does not have batchCursors (#330)
* Do not call flushBuffers on exitApplication if object does not have batchCursors (cherry picked from commit f5af43f)
1 parent 69f1f34 commit e4ccc77

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,8 +1322,7 @@ public string StaticContentBase
13221322
set { staticContentBase = value; }
13231323

13241324
}
1325-
1326-
protected void exitApplication()
1325+
protected void ExitApp()
13271326
{
13281327
if (disconnectUserAtCleanup)
13291328
{
@@ -1333,7 +1332,11 @@ protected void exitApplication()
13331332
}
13341333
catch (Exception) {; }
13351334
}
1335+
}
13361336

1337+
protected void exitApplication()
1338+
{
1339+
ExitApp();
13371340
}
13381341

13391342
private bool IsGxAjaxRequest()

dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,21 @@ public static WaitCallback PropagateCulture(WaitCallback action)
8080
action(x);
8181
};
8282
}
83+
protected void ExitApp()
84+
{
85+
exitApplication(BatchCursorHolder());
86+
}
8387
protected void exitApplication()
8488
{
85-
foreach (IGxDataStore ds in context.DataStores)
86-
ds.Connection.FlushBatchCursors(this);
89+
exitApplication(true);
90+
}
91+
private void exitApplication(bool flushBatchCursor)
92+
{
93+
if (flushBatchCursor)
94+
{
95+
foreach (IGxDataStore ds in context.DataStores)
96+
ds.Connection.FlushBatchCursors(this);
97+
}
8798

8899
if (IsMain)
89100
dbgInfo?.OnExit();
@@ -103,7 +114,7 @@ protected void exitApplication()
103114
#endif
104115

105116
}
106-
117+
protected virtual bool BatchCursorHolder() { return false; }
107118
protected virtual void printHeaders(){}
108119
protected virtual void printFooters(){}
109120

0 commit comments

Comments
 (0)