Do not stop CQN notifications that were not started
This commit is contained in:
parent
037c817305
commit
7af8400b9d
|
@ -442,12 +442,15 @@ bool njsSubscription_startNotifications(njsSubscription *subscr,
|
|||
// subscription is deregistered, either directly via a call to unsubscribe()
|
||||
// or indirectly via the timeout attribute or the quality of service flag that
|
||||
// tells a subscription to deregister after the first notification has been
|
||||
// received.
|
||||
// received. If notifications were never started (due to an error of some kind)
|
||||
// nothing needs to be done at this point.
|
||||
//-----------------------------------------------------------------------------
|
||||
bool njsSubscription_stopNotifications(njsSubscription *subscr)
|
||||
{
|
||||
if (subscr->name) {
|
||||
uv_close((uv_handle_t*) &subscr->async,
|
||||
njsSubscription_onStopNotifications);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ describe('185. runCQN.js', function() {
|
|||
}); // 185.8
|
||||
|
||||
// An variation of 185.4
|
||||
it.skip('185.9 Negative - unsubscribe the invalid subscription', async () => {
|
||||
it('185.9 Negative - unsubscribe the invalid subscription', async () => {
|
||||
try {
|
||||
const TABLE = 'nodb_tab_cqn_9';
|
||||
const myCallback = async function(message) {
|
||||
|
@ -456,7 +456,7 @@ describe('185. runCQN.js', function() {
|
|||
);
|
||||
// DPI-1013: not supported
|
||||
|
||||
conn.unsubscribe('sub9');
|
||||
await conn.unsubscribe('sub9');
|
||||
|
||||
} catch (err) {
|
||||
should.not.exist(err);
|
||||
|
|
Loading…
Reference in New Issue