Socket
Socket
Sign inDemoInstall

inceptum

Package Overview
Dependencies
420
Maintainers
3
Versions
142
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.7 to 0.8.8

4

dist/rabbitmq/RabbitmqClient.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { Connection, Channel } from 'amqplib';

@@ -35,2 +36,3 @@ import { Logger } from '../log/LogManager';

export declare abstract class RabbitmqClient {
connectionClosedTimer: NodeJS.Timer;
protected channel: Channel;

@@ -56,2 +58,4 @@ protected connection: Connection;

protected handleConnectionError(err?: any): void;
private clearConnectionClosedTimer();
protected handleConnectionClosedDelayed(): Promise<void>;
protected handleConnectionClosed(): Promise<void>;

@@ -58,0 +62,0 @@ protected createChannel(): Promise<void>;

@@ -60,3 +60,4 @@ "use strict";

if (err) {
this.logger.error(err, 'Connection error. Ignoring');
this.logger.error(err, 'Connection error.');
this.handleConnectionClosedDelayed();
}

@@ -67,3 +68,20 @@ else {

}
clearConnectionClosedTimer() {
if (this.connectionClosedTimer) {
clearTimeout(this.connectionClosedTimer);
this.connectionClosedTimer = undefined;
}
}
async handleConnectionClosedDelayed() {
this.clearConnectionClosedTimer();
try {
this.connection.close();
}
catch (e) {
this.logger.error(e, 'Got an error on the connection. Attempting to close just in case. Had an error');
}
this.connectionClosedTimer = setTimeout(() => this.handleChannelClosed(), 500);
}
async handleConnectionClosed() {
this.clearConnectionClosedTimer();
if (!this.closed) {

@@ -70,0 +88,0 @@ // We haven't been explicitly closed, so we should reopen the channel

2

package.json
{
"name": "inceptum",
"version": "0.8.7",
"version": "0.8.8",
"description": "hipages take on the foundational library for enterprise-grade apps written in NodeJS",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc