Skip to content

Commit 06967a1

Browse files
committed
r0b08x [chore] 4/25/2024, 2:46:27 AM
1 parent c73695e commit 06967a1

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ https://corifeus.com/redis-ui
1212

1313

1414
---
15-
# 🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface v2024.4.221
15+
# 🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface v2024.4.223
1616

1717

1818

@@ -112,7 +112,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://
112112

113113
---
114114

115-
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.221
115+
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.223
116116

117117
[![NPM](https://img.shields.io/npm/v/p3x-redis-ui-server.svg)](https://www.npmjs.com/package/p3x-redis-ui-server) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
118118

artifacts/cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://
2525

2626
---
2727

28-
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.221
28+
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.223
2929

3030
[![NPM](https://img.shields.io/npm/v/p3x-redis-ui-server.svg)](https://www.npmjs.com/package/p3x-redis-ui-server) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
3131

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p3x-redis-ui-server",
3-
"version": "2024.4.221",
3+
"version": "2024.4.223",
44
"description": "🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface",
55
"corifeus": {
66
"icon": "fas fa-flag-checkered",

src/service/socket.io/request/set-subscription.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ module.exports = async (options) => {
22
const { socket, payload } = options;
33

44
try {
5-
if (socket.p3xrs && socket.p3xrs.subscription) {
6-
// Unsubscribe before clearing the old listener to prevent memory leaks
7-
await socket.p3xrs.ioredisSubscriber.punsubscribe('*');
5+
//console.log('Unsubscribing from all patterns');
6+
await socket.p3xrs.ioredisSubscriber.punsubscribe();
7+
//console.log('All patterns unsubscribed');
8+
9+
socket.p3xrs.ioredisSubscriber.removeAllListeners('pmessage');
10+
//console.log('Removed all pmessage listeners');
811

9-
// Remove old listeners to prevent multiple listeners from accumulating
10-
socket.p3xrs.ioredisSubscriber.removeAllListeners('pmessage');
11-
}
1212

1313
// Updating subscription settings
1414
socket.p3xrs.subscription = payload.subscription;
@@ -18,13 +18,13 @@ module.exports = async (options) => {
1818

1919
if (socket.p3xrs.subscription === true) {
2020
// Subscribe to the pattern
21+
//console.log('socket.p3xrs.ioredisSubscriber.psubscribe', payload.subscriberPattern)
2122
await socket.p3xrs.ioredisSubscriber.psubscribe(payload.subscriberPattern);
2223

23-
console.log('socket.p3xrs.subscription', payload.subscriberPattern)
2424

2525
// Handle incoming messages
2626
socket.p3xrs.ioredisSubscriber.on('pmessage', (pattern, channel, message) => {
27-
//console.log('subscription', pattern, channel, message)
27+
console.log('socket.p3xrs.ioredisSubscriber.on(pmessage)', pattern, channel, message)
2828
socket.emit('pubsub-message', {
2929
channel: channel,
3030
message: message,

0 commit comments

Comments
 (0)