Socket
Socket
Sign inDemoInstall

pm2-axon

Package Overview
Dependencies
6
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

62

lib/sockets/sock.js

@@ -373,33 +373,43 @@

if (unixSocket) {
// TODO: move out
this.server.on('error', function(e) {
if (e.code == 'EADDRINUSE') {
// Unix file socket and error EADDRINUSE is the case if
// the file socket exists. We check if other processes
// listen on file socket, otherwise it is a stale socket
// that we could reopen
// We try to connect to socket via plain network socket
var clientSocket = new net.Socket();
this.server.on('error', function(e) {
//if (e.code == 'ECONNREFUSED') {
// No other server listening, so we can delete stale
// socket file and reopen server socket
fs.unlink(port);
self.server.listen(port, host, fn);
//}
});
clientSocket.on('error', function(e2) {
if (e2.code == 'ECONNREFUSED') {
// No other server listening, so we can delete stale
// socket file and reopen server socket
fs.unlink(port);
self.server.listen(port, host, fn);
}
});
clientSocket.connect({path: port}, function() {
// Connection is possible, so other server is listening
// on this file socket
throw e;
});
}
});
}
// if (unixSocket) {
// // TODO: move out
// this.server.on('error', function(e) {
// if (e.code == 'EADDRINUSE') {
// // Unix file socket and error EADDRINUSE is the case if
// // the file socket exists. We check if other processes
// // listen on file socket, otherwise it is a stale socket
// // that we could reopen
// // We try to connect to socket via plain network socket
// var clientSocket = new net.Socket();
// clientSocket.on('error', function(e2) {
// if (e2.code == 'ECONNREFUSED') {
// // No other server listening, so we can delete stale
// // socket file and reopen server socket
// fs.unlink(port);
// self.server.listen(port, host, fn);
// }
// });
// clientSocket.connect({path: port}, function() {
// // Connection is possible, so other server is listening
// // on this file socket
// throw e;
// });
// }
// });
// }
this.server.listen(port, host, fn);
return this;
};
{
"name": "pm2-axon",
"description": "High-level messaging & socket patterns implemented in pure js",
"version": "2.0.2",
"version": "2.0.3",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "author": {

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