From e5f52695a3b83f8ab38ffe949b2f7a04726dc0ab Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 21 Jan 2021 17:54:03 +0100 Subject: implement pluggable transport Signed-off-by: Mikael Magnusson --- pkg/server/rpki.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg/server/rpki.go') diff --git a/pkg/server/rpki.go b/pkg/server/rpki.go index 00fbfcfa..af51fa02 100644 --- a/pkg/server/rpki.go +++ b/pkg/server/rpki.go @@ -53,7 +53,7 @@ type roaEvent struct { EventType roaEventType Src string Data []byte - conn *net.TCPConn + conn net.Conn } type roaManager struct { @@ -309,7 +309,7 @@ func (m *roaManager) GetServers() []*config.RpkiServer { type roaClient struct { host string - conn *net.TCPConn + conn net.Conn state config.RpkiServerState eventCh chan *roaEvent sessionID uint16 @@ -383,14 +383,14 @@ func (c *roaClient) tryConnect() { return default: } - if conn, err := net.Dial("tcp", c.host); err != nil { + if conn, err := transport.Dial("tcp", c.host); err != nil { // better to use context with timeout time.Sleep(connectRetryInterval * time.Second) } else { c.eventCh <- &roaEvent{ EventType: roaConnected, Src: c.host, - conn: conn.(*net.TCPConn), + conn: conn, } return } -- cgit v1.2.3