summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/rpki.go
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-01-21 17:54:03 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2021-10-19 01:26:21 +0200
commite5f52695a3b83f8ab38ffe949b2f7a04726dc0ab (patch)
tree2a2c6decbb72ad66b2e6a0949c668adfc854fdc0 /pkg/server/rpki.go
parentc8e54e7f8a2a49c8c035d5becf33b21fc0babf25 (diff)
implement pluggable transporttransport
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'pkg/server/rpki.go')
-rw-r--r--pkg/server/rpki.go8
1 files changed, 4 insertions, 4 deletions
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
}