aboutsummaryrefslogtreecommitdiffstats
path: root/core/connection.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/connection.go')
-rw-r--r--core/connection.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/connection.go b/core/connection.go
index 67c7e1d..02f980a 100644
--- a/core/connection.go
+++ b/core/connection.go
@@ -174,8 +174,7 @@ func (c *Connection) connectVPP() error {
if err := c.vppClient.Connect(); err != nil {
return err
}
-
- log.Debugf("Connected to VPP.")
+ log.Debugf("Connected to VPP")
if err := c.retrieveMessageIDs(); err != nil {
c.vppClient.Disconnect()
@@ -202,7 +201,12 @@ func (c *Connection) Disconnect() {
// disconnectVPP disconnects from VPP in case it is connected.
func (c *Connection) disconnectVPP() {
if atomic.CompareAndSwapUint32(&c.vppConnected, 1, 0) {
- c.vppClient.Disconnect()
+ log.Debug("Disconnecting from VPP..")
+
+ if err := c.vppClient.Disconnect(); err != nil {
+ log.Debugf("Disconnect from VPP failed: %v", err)
+ }
+ log.Debug("Disconnected from VPP")
}
}