pinojs / pino-socket

🌲 A transport for sending pino logs to network sockets
43 stars 14 forks source link

resolves #73 TCPConnection can reconnect even if the TCP server wasn't available at first #76

Closed ggrossetie closed 2 years ago

mcollina commented 2 years ago

This new test seems passing without any code changes, is that expected?

ggrossetie commented 2 years ago

This new test seems passing without any code changes, is that expected?

Yes, the TCPConnection can reconnect even if open is not emitted. However, ThreadStream will not write/send data to the stream if open is not emitted.

In https://github.com/pinojs/pino-socket/pull/78 I make sure that the open event is emitted (to honor ThreadStream contract)