From 033011db62338b0e23ef48fc01fc532c5ad55e74 Mon Sep 17 00:00:00 2001 From: Kory Prince Date: Tue, 27 Apr 2021 10:44:01 -0500 Subject: [PATCH] socket: fill out TestConnection implementation --- adapter-socket.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/adapter-socket.go b/adapter-socket.go index 01c5600..535c9c4 100644 --- a/adapter-socket.go +++ b/adapter-socket.go @@ -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 }