Open delleceste opened 4 years ago
Nobody has an idea of where I am wrong?
@delleceste https://nchan.io/#subscriber-presence says:
Note that the subscribe/unsubscribe hooks are disabled for long-poll and interval-poll clients, because they would trigger these hooks each time they receive a message.
Those callbacks are for WS connections only, I think.
We had to build longpoll presence feature separately, based on a timer and expiring keys in redis.
With this configuration
` location ~ /sub/(.+)$ { nchan_channel_id $1; nchan_subscribe_request /upstream/sub; nchan_unsubscribe_request /upstream/unsub; nchan_subscriber; }
var source = new EventSource('http://localhost:8001/sub/subscribe/hokuto:20000/test/device/1/double_scalar');
is correctly forwarded to location upstream/sub
but
source.close()
does not trigger an unsub (nothing is actually delivered to http://127.0.0.1:9292 upon source.close() )
Expected behaviour:
source.close() should be notified upstream