You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "scholarsmate (via GitHub)" <gi...@apache.org> on 2023/03/21 17:13:12 UTC

[GitHub] [daffodil-vscode] scholarsmate commented on a diff in pull request #509: Safeguard for multiple data editor instances.

scholarsmate commented on code in PR #509:
URL: https://github.com/apache/daffodil-vscode/pull/509#discussion_r1143747407


##########
src/omega_edit/client.ts:
##########
@@ -26,6 +26,7 @@ import { DataEditWebView } from './dataEditWebView'
 import { initOmegaEditClient } from './utils'
 
 export let serverPort: number = 9000
+export let serverPortLock: boolean = false

Review Comment:
   Instead of introducing another variable, we can use the serverPort above.  Just make it either 0, or 'undefined'.  The first instance will set it to a positive number and the second instance can check if the port number is positive, which is should be and lock the user out from creating a second DE.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org