File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1+ ### 3.0.3 - (2024-06-12)
2+
3+ - Release the resources if ` Session.createReceiver() ` rejects due to timeout.
4+
15### 3.0.2 - (2024-05-02)
26
37- Set the max listener limit to 1000 for ` RheaConnection `
Original file line number Diff line number Diff line change 22// Licensed under the Apache License. See License in the project root for license information.
33
44import * as log from "./log" ;
5- import { Connection } from "./connection" ;
5+ import { Connection , CreateReceiverOptions } from "./connection" ;
66import { Receiver , ReceiverOptions } from "./receiver" ;
77import { Sender , SenderOptions } from "./sender" ;
88import {
@@ -396,6 +396,15 @@ export class Session extends Entity {
396396 const msg : string = `Unable to create the amqp receiver '${ receiver . name } ' on amqp ` +
397397 `session '${ this . id } ' due to operation timeout.` ;
398398 log . error ( "[%s] %s" , this . connection . id , msg ) ;
399+
400+ const createReceiverOptions = options as CreateReceiverOptions ;
401+ if ( createReceiverOptions ?. session ?. createReceiver ) {
402+ // being called on a session passed via the options so don't close the session
403+ receiver . close ( { closeSession : false } ) . then ( ( ) => { receiver . remove ( ) ; } )
404+ } else {
405+ receiver . close ( { closeSession : true } ) . then ( ( ) => { receiver . remove ( ) ; } )
406+ }
407+
399408 return reject ( new OperationTimeoutError ( msg ) ) ;
400409 } ;
401410
Original file line number Diff line number Diff line change 11{
22 "name" : " rhea-promise" ,
3- "version" : " 3.0.2 " ,
3+ "version" : " 3.0.3 " ,
44 "description" : " A Promisified layer over rhea AMQP client" ,
55 "license" : " Apache-2.0" ,
66 "main" : " ./dist/lib/index.js" ,
You can’t perform that action at this time.
0 commit comments