robur-coop / happy-eyeballs

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

An `assert false` can be reach #17

Closed dinosaure closed 2 years ago

dinosaure commented 2 years ago

I don't really understand why but when I launched one of my unikernel, I finally reach this assert false: https://github.com/roburio/happy-eyeballs/blob/01aef1fcaf65f5de8be7e23d55f70bee0cf571c7/src/happy_eyeballs.ml#L185

Not sure that it is expected. I will try to figure out why.

hannesm commented 2 years ago

From the code, it is possible that at the begin of timer there are entries in the connection map. Now if all connections are timing out by the timer, the actions will contain Connect_failed elements, and the connection map will be empty at the end. //cc @reynir

hannesm commented 2 years ago

please take a look at #18 (and mirage/ocaml-dns#274) whether this fixes the issue for you. thanks.