Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const tryConnect = (cb) => {
retriesRemaining--
// Check if sbot/scutlle-shell is already running
client(config.keys, config, (err, sbot) => {
// err implies no server currently running
if (err) {
// start scuttle shell if haven't already tried starting it
if (!started) {
server = child.fork(path.resolve(__dirname, './start'), {
stdio: [
'ignore',
'ignore',
'ignore',
'ipc'
]
})
server.send({ config })
started = true
}
}