mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-11-30 10:47:41 +08:00
feat: catch ws connect error
This commit is contained in:
parent
c2950453ff
commit
789045c372
@ -85,6 +85,9 @@ io.on('connection', (socket) => {
|
||||
{}
|
||||
),
|
||||
});
|
||||
ws.on('error', (err) => {
|
||||
socket.emit('ws-client', { type: 'ws-connect-back', status: -1, content: err });
|
||||
});
|
||||
} catch (error) {
|
||||
socket.emit('ws-client', { type: 'ws-connect-back', status: -1, content: error });
|
||||
ws = null;
|
||||
|
Loading…
Reference in New Issue
Block a user