THRIFT-2880 Read the network address from the listener if available.
Client: Go
Patch: awaw fumin <awawfumin@gmail.com>
diff --git a/lib/go/thrift/server_socket.go b/lib/go/thrift/server_socket.go
index 4c80714..2581056 100644
--- a/lib/go/thrift/server_socket.go
+++ b/lib/go/thrift/server_socket.go
@@ -96,6 +96,9 @@
 }
 
 func (p *TServerSocket) Addr() net.Addr {
+	if p.listener != nil {
+		return p.listener.Addr()
+	}
 	return p.addr
 }