This commit is contained in:
nguyentrungthat 2025-11-12 08:01:19 +07:00
parent 00c91f1e69
commit f04bc0b4c1
2 changed files with 4 additions and 3 deletions

View File

@ -146,9 +146,9 @@ export default class LineConnection {
this.socketIO.emit('line_error', { this.socketIO.emit('line_error', {
stationId, stationId,
lineId: id, lineId: id,
error: err.message + '\r\n', error: '\n' + err.message + '\n',
}) })
reject(err) resolve()
}) })
this.client.on('close', () => { this.client.on('close', () => {

View File

@ -548,7 +548,8 @@ export class WebSocketIo {
} }
} }
} catch (err: any) { } catch (err: any) {
io.emit('line_error', { lineId, error: `[ERROR] ${err.message}\r\n`, stationId }) this.lineConnecting = this.lineConnecting.filter((el) => el !== lineId)
io.emit('line_error', { lineId, error: `\n[ERROR] ${err.message}\n`, stationId })
} }
} }
} }