Closed ggrossetie closed 2 years ago
As mentioned in https://github.com/pinojs/pino-socket/issues/77, onSocketClose callback function cannot be serialized across worker thread boundaries.
onSocketClose
I think it would be better to emit an event on the stream with an optional Error:
outputStream.emit('socketClose', hadError && socketError)
To be consistent, we should probably do the same when we cannot reconnect:
retry.on('fail', (err) => { outputStream.emit('reconnectFailure', err) // or socketReconnectFailure? })
Fixed in https://github.com/pinojs/pino-socket/commit/53250e6e764240f0adba38d075db2e93dfdd7056
As mentioned in https://github.com/pinojs/pino-socket/issues/77,
onSocketClose
callback function cannot be serialized across worker thread boundaries.I think it would be better to emit an event on the stream with an optional Error:
To be consistent, we should probably do the same when we cannot reconnect: