robur-coop / happy-eyeballs

An implementation of happy eyeballs (RFC 8305) in OCaml with lwt
ISC License
22 stars 4 forks source link

Log output confusing when multiple happy-eyeballs instances in play #35

Closed reynir closed 11 months ago

reynir commented 12 months ago

When using Happy_eyeballs_lwt two instances of happy-eyeballs are active: one in Happy_eyeballs_lwt and one in Dns_client_lwt. This leads to log messages where it is not possible to tell which instance it originates from. See https://github.com/ocaml/infrastructure/issues/73#issuecomment-1726736692 for an example.

I'm not sure what to do about it, and I can't think of an elegant solution; maybe this is a WONTFIX.

hannesm commented 12 months ago

What we can do, is use a mutable reference, which we store within create in the record and increment it.This way, each create will return a fresh counter, which we can use in log output. WDYT?

reynir commented 11 months ago

Thanks!