Fix no auth bug
This commit is contained in:
parent
48af24fd3d
commit
930b4a048b
1 changed files with 5 additions and 0 deletions
|
|
@ -238,6 +238,11 @@ const startSocket = socket => {
|
|||
const on = encryptedOn(socket)
|
||||
const { encryptionId } = socket.handshake.auth
|
||||
|
||||
if (!isAuthenticated()) {
|
||||
logger.warn('GunDB is not yet authenticated')
|
||||
socket.emit(Common.Constants.ErrorCode.NOT_AUTH)
|
||||
}
|
||||
|
||||
on('subscribe:query', ({ $shock, publicKey }, response) => {
|
||||
const subscriptionId = uuidv4()
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue