sketchy in-prod debug attempt

This commit is contained in:
Mark Nadal 2020-09-19 15:28:07 -07:00
parent 095688b8e8
commit 7264d124a0
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
;(function(){
var cluster = require('cluster');
if(cluster.isMaster){
return cluster.fork() && cluster.on('exit', function(){ cluster.fork(); require('../lib/crashed'); });
return cluster.fork() && cluster.on('exit', function(){ return;cluster.fork(); require('../lib/crashed'); });
}
var fs = require('fs');

1
gun.js
View File

@ -1145,6 +1145,7 @@
var hear = mesh.hear = function(raw, peer){
if(!raw){ return }
require('fs').writeFileSync('heardatadebug.json',raw,noop);
if(opt.pack <= raw.length){ return mesh.say({dam: '!', err: "Message too big!"}, peer) }
if(mesh === this){ hear.d += raw.length||0 ; ++hear.c } // STATS!
var tmp = raw[0], msg;