informatikr / hedis

A Redis client library for Haskell.
http://hackage.haskell.org/package/hedis
BSD 3-Clause "New" or "Revised" License
327 stars 121 forks source link

If you specify a `UnixSocket`, your `HostName` is ignored #188

Open bmillwood opened 1 year ago

bmillwood commented 1 year ago

I think instead of connectHost and connectPort, the connection details should include connectAddr which is a SockAddr. This would help avoid confusion about what connectHost does or whether it needs to be set correctly when you're connecting via Unix socket.

aravindgopall commented 1 year ago

Merging #189.

We can further discuss here about how to take this forward with maintaining backward compatibility for the current users. Another idea is to make the connectHost as Maybe and return error on Nothing when connectPort is not Unix Socket.