summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/bmp.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/bmp.go
parentc8e54e7f8a2a49c8c035d5becf33b21fc0babf25 (diff)
implement pluggable transporttransport
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'pkg/server/bmp.go')
-rw-r--r--pkg/server/bmp.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/server/bmp.go b/pkg/server/bmp.go
index 67eebd0c..828bdd56 100644
--- a/pkg/server/bmp.go
+++ b/pkg/server/bmp.go
@@ -81,11 +81,11 @@ func (r ribout) update(p *table.Path) bool {
return true
}
-func (b *bmpClient) tryConnect() *net.TCPConn {
+func (b *bmpClient) tryConnect() net.Conn {
interval := 1
for {
log.WithFields(log.Fields{"Topic": "bmp"}).Debugf("Connecting BMP server:%s", b.host)
- conn, err := net.Dial("tcp", b.host)
+ conn, err := transport.Dial("tcp", b.host)
if err != nil {
select {
case <-b.dead:
@@ -98,7 +98,7 @@ func (b *bmpClient) tryConnect() *net.TCPConn {
}
} else {
log.WithFields(log.Fields{"Topic": "bmp"}).Infof("BMP server is connected:%s", b.host)
- return conn.(*net.TCPConn)
+ return conn
}
}
}