blind-peer 2.7.16 → 2.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.js +3 -3
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -149,12 +149,12 @@ const cmd = command('blind-peer',
|
|
|
149
149
|
const pendingWrites = stream._wreqs.length - stream._wfree.length
|
|
150
150
|
if (pendingWrites >= 100) {
|
|
151
151
|
nrBigStreams++
|
|
152
|
-
|
|
152
|
+
logger.warn(`Stream ${stream.id} (remote id: ${stream.remoteId}) has ${pendingWrites} pending writes:\nStream JSON: ${JSON.stringify(stream.toJSON(), null, 1)}\nSocket json: ${stream.socket ? JSON.stringify(stream.socket.toJSON(), null, 1) : 'none'}\nhex streamhandle: ${b4a.toString(stream._handle, 'hex')}\nhex socket handle: ${stream.socket ? b4a.toString(stream.socket._handle, 'hex') : 'none'}`)
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
if (nrBigStreams > 0)
|
|
155
|
+
if (nrBigStreams > 0) logger.warn(`Total streams with many pending writes: ${nrBigStreams}`)
|
|
156
156
|
} catch (e) { // we don't want to crash the process with our debugging
|
|
157
|
-
|
|
157
|
+
logger.warn(`logStreams errored unexpectedly: ${e.stack}`)
|
|
158
158
|
}
|
|
159
159
|
}, 30_000)
|
|
160
160
|
}
|