This file (917B) exceeds the allowed full mode (48 kb) size. The editor full height is disabled, only scrolling is allowed.
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height mode.
import * as sharedIoRedis from '../../shared.mjs'
const consolePrefix = 'socket.io connection disconnect'
export default async (options) => {
const {socket, payload} = options;
const {connectionId} = payload;
console.warn(consolePrefix, 'connectionId', connectionId, 'socket.p3xrs.connectionId', socket.p3xrs.connectionId)
try {
if (socket.p3xrs.connectionId === connectionId) {
console.warn(consolePrefix, 'will disconnect from redis')
sharedIoRedis.disconnectRedis({
socket: socket,
})
}
socket.emit(options.responseEvent, {
status: 'ok',
})
} catch (e) {
console.error(e)
socket.emit(options.responseEvent, {
status: 'error',
error: e.message
})
} finally {
sharedIoRedis.sendStatus({
socket: socket,
})
}
}
| / | Focus search |
| ? | Show this help |
| Esc | Unfocus input |