Merge pull request #352 from shocknet/bug/socket-callback-encryption
Add encryption toggle to Socket callbacks
This commit is contained in:
commit
fbbb4f7920
1 changed files with 4 additions and 0 deletions
|
|
@ -148,6 +148,10 @@ const encryptedOn = socket => (eventName, callback) => {
|
||||||
*/
|
*/
|
||||||
const encryptedCallback = (socket, callback) => async (...args) => {
|
const encryptedCallback = (socket, callback) => async (...args) => {
|
||||||
try {
|
try {
|
||||||
|
if (process.env.SHOCK_ENCRYPTION_ECC === 'false') {
|
||||||
|
return callback(...args)
|
||||||
|
}
|
||||||
|
|
||||||
const deviceId = socket.handshake.auth.encryptionId
|
const deviceId = socket.handshake.auth.encryptionId
|
||||||
|
|
||||||
if (!deviceId) {
|
if (!deviceId) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue