Skip to content

Commit 8387831

Browse files
committed
-fixes an issue where the data editor server failed to close at the
completion of debugging Closes apache#1214
1 parent c117bd2 commit 8387831

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/dataEditor/dataEditorClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ function removeDirectory(dirPath: string): void {
11121112
}
11131113
}
11141114

1115-
async function serverStop() {
1115+
export async function serverStop() {
11161116
const serverPidFile = getPidFile(omegaEditPort)
11171117
if (fs.existsSync(serverPidFile)) {
11181118
const pid = parseInt(fs.readFileSync(serverPidFile).toString())

src/dataEditor/include/server/Sessions.ts

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
import { destroySession } from '@omega-edit/client'
1818
import { updateHeartbeatInterval } from './heartbeat'
19+
import { serverStop } from '../../dataEditorClient'
1920

2021
let activeSessions: string[] = []
2122

@@ -31,4 +32,5 @@ export async function removeActiveSession(sessionId: string) {
3132
activeSessions.splice(index, 1)
3233
updateHeartbeatInterval(activeSessions)
3334
await destroySession(sessionId)
35+
await serverStop()
3436
}

0 commit comments

Comments
 (0)