diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2018-10-23 15:40:44 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2018-10-23 15:40:44 +0200 |
commit | feb7f540dd601aa108167c256bceb84474d38a18 (patch) | |
tree | 2b518a153b0035555fcc32d0159113357628557e /core/request_handler.go | |
parent | 6d6ad42ec0942a378c5550ad3472f388d7c85d49 (diff) |
Remove the global variable for connection
- this also fixes issue where after connect failure all following connects
failed 'with only one connection per process is supported'
- this global was used to limit to single connection, but the actual
limitation is for the adapter and with different adapter implementation
multiple connections could actually be supported
- the global defined in the vppapiclient package will continue to limit
to single connection via VppClient implementation of the adapter
Change-Id: Id06dd6e80b51d1d43f6f75bbcc6e01c6f21c605a
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'core/request_handler.go')
-rw-r--r-- | core/request_handler.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/core/request_handler.go b/core/request_handler.go index 545f235..4004d15 100644 --- a/core/request_handler.go +++ b/core/request_handler.go @@ -132,9 +132,6 @@ func (c *Connection) processRequest(ch *Channel, req *vppRequest) error { // msgCallback is called whenever any binary API message comes from VPP. func (c *Connection) msgCallback(msgID uint16, data []byte) { - connLock.RLock() - defer connLock.RUnlock() - if c == nil { log.Warn("Already disconnected, ignoring the message.") return |