mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 20:46:01 +00:00
handle errors when sending to subprocess #458
This commit is contained in:
@@ -33,11 +33,15 @@ function callForwardProcess(connection, tunnelConfig, tunnelCacheKey) {
|
||||
);
|
||||
pipeForkLogs(subprocess);
|
||||
|
||||
subprocess.send({
|
||||
msgtype: 'connect',
|
||||
connection,
|
||||
tunnelConfig,
|
||||
});
|
||||
try {
|
||||
subprocess.send({
|
||||
msgtype: 'connect',
|
||||
connection,
|
||||
tunnelConfig,
|
||||
});
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'Error connecting SSH');
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
subprocess.on('message', resp => {
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user