You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a use case where authentication is required:
constlogger=newFluentClient("output",{socket: {host: "fluentd.local",port: 24224,timeout: 3000,disableReconnect: true,tls: {ca: require('fs').readFileSync('./fluentd.crt'),},},security: {clientHostname: "client.local",sharedKey: "incorrect",username: "ooo",password: "xxx"},});try{awaitlogger.connect();}catch(err){/* do something with err */}
When security is not correctly configured, connect() still resolves.
Though the error could be detected by logger.socketOn('error'), it's not synchronous with connect() and some mechanism to wait for the error (or to ensure no error thrown) is required.
If connect() can reject on error, it would be more easy to determine whether the client is authenticated successfully.
The text was updated successfully, but these errors were encountered:
Hi, I have a use case where authentication is required:
When security is not correctly configured,
connect()
still resolves.Though the error could be detected by
logger.socketOn('error')
, it's not synchronous withconnect()
and some mechanism to wait for the error (or to ensure no error thrown) is required.If
connect()
can reject on error, it would be more easy to determine whether the client is authenticated successfully.The text was updated successfully, but these errors were encountered: