Remove socket protocol logger

This commit is contained in:
Guangcong Luo
2019-01-11 02:15:04 -06:00
parent 4f1fe41e96
commit ffe7977e44

View File

@@ -15,7 +15,6 @@
const cluster = require('cluster');
const fs = require('fs');
const FS = require('./lib/fs');
if (cluster.isMaster) {
cluster.setupMaster({
@@ -423,14 +422,10 @@ if (cluster.isMaster) {
* @type {Map<string, Map<string, string>>}
*/
const subchannels = new Map();
/** @type {WriteStream} */
const logger = FS(`logs/sockets-${process.pid}`).createAppendStream();
// Deal with phantom connections.
const sweepSocketInterval = setInterval(() => {
sockets.forEach(socket => {
logger.write(`Found a ghost connection with a protocol of ${socket.protocol}\n`);
// @ts-ignore
if (socket.protocol === 'xhr-streaming' && socket._session && socket._session.recv) {
// @ts-ignore