nroi / paracusia

Elixir library for MPD (Music Player Daemon)
MIT License
12 stars 2 forks source link

Fix hostname as socket ambiguity #10

Closed mroach closed 5 years ago

mroach commented 5 years ago

Fixes #9

If the hostname existed on the system as a directory or file, it would assumed to be a socket. This upgrades the logic to use File.stat/1 to check the node type. When it's :other, it's a socket.

Also add some extra connection details to debug message to help diagnose failed connections.

(There weren't unit tests for this class, so I tested it the old fashioned way: by hand)

nroi commented 5 years ago

thanks!