socket: fill out TestConnection implementation

This commit is contained in:
Kory Prince 2021-04-27 10:44:01 -05:00
parent b20b6caad7
commit 033011db62
1 changed files with 9 additions and 0 deletions

View File

@ -186,5 +186,14 @@ func (h *SocketAdapter) GetHttpUri(namespace string, object interface{}) string
}
func (h *SocketAdapter) TestConnection() error {
sock, err := h.GetSocket()
if err != nil {
return err
}
conn, err := net.Dial("unix", sock)
if err != nil {
return err
}
conn.Close()
return nil
}