- Consolidated duplicate UndoManagers to single instance - Fixed connection promise to only resolve on 'connected' status - Fixed WebSocketProvider import (WebsocketProvider) - Added proper doc.destroy() cleanup - Renamed isPresenceInitialized property to avoid conflict Co-Authored-By: Paperclip <noreply@paperclip.ing>
21 lines
453 B
JavaScript
21 lines
453 B
JavaScript
module.exports = function (query, force) {
|
|
var isAttached = false
|
|
if (process.stderr.isTTY || force === true) {
|
|
isAttached = true
|
|
process.on('SIGINFO', onsiginfo)
|
|
process.on('SIGUSR1', onsiginfo)
|
|
}
|
|
|
|
return function () {
|
|
if (isAttached === true) {
|
|
process.removeListener('SIGINFO', onsiginfo)
|
|
process.removeListener('SIGUSR1', onsiginfo)
|
|
isAttached = false
|
|
}
|
|
}
|
|
|
|
function onsiginfo () {
|
|
query()
|
|
}
|
|
}
|