mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 09:36:01 +00:00
try to fix e_channel_closed error
This commit is contained in:
@@ -219,7 +219,16 @@ module.exports = {
|
||||
if (!session) {
|
||||
throw new Error('Invalid session');
|
||||
}
|
||||
session.subprocess.send({ msgtype: 'ping' });
|
||||
try {
|
||||
session.subprocess.send({ msgtype: 'ping' });
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'Error pinging session');
|
||||
|
||||
return {
|
||||
status: 'error',
|
||||
message: 'Ping failed',
|
||||
};
|
||||
}
|
||||
|
||||
return { state: 'ok' };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user