will / crystal-pg

a postgres driver for crystal
BSD 3-Clause "New" or "Revised" License
462 stars 77 forks source link

Make listen blocking #238

Closed carlhoerberg closed 2 years ago

carlhoerberg commented 2 years ago

Exceptions, e.g. IO::EOFError, becasue the connection is lost are impossible to handle without this patch.

carlhoerberg commented 2 years ago

FIxes https://github.com/will/crystal-pg/issues/195

will commented 2 years ago

Thanks for the patch. This does make sense to me I think, but I don’t use listen/notify myself at all. So I think it'd be a good idea to wait like ~1 week for comments since this would be a breaking change for anyone using it right now.

Related, I think this made spec/pg/connection_spec.cr lock up, so could you please do some changes there too?

will commented 2 years ago

Thanks for submitting this, and reviving discussion on the issue, even if it wasn't merged. The other solution worked on in 195 has been released with v0.25.0