diff options
author | mhalaj1 <matus.halaj@pantheon.tech> | 2021-08-26 20:15:08 +0200 |
---|---|---|
committer | mhalaj1 <matus.halaj@pantheon.tech> | 2021-09-07 15:24:53 +0200 |
commit | c09ee3241377aae2530a73d48c4e20641d76d0ee (patch) | |
tree | 219fd1f7d9ba595f0f4c8dac9796bc76ce3556fc /binapi/ip/ip_rpc.ba.go | |
parent | debc52dea8a81417bb08ca5bb934c7876b6d65e0 (diff) |
Refactoring and fixes
* refactor creation of new channel
* add missing closing of created streams
* correct documentation regarding thread safety of stream
Signed-off-by: mhalaj1 <matus.halaj@pantheon.tech>
Change-Id: Ic601efff298fcbdecaafab83fa236253af69de21
Diffstat (limited to 'binapi/ip/ip_rpc.ba.go')
-rw-r--r-- | binapi/ip/ip_rpc.ba.go | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/binapi/ip/ip_rpc.ba.go b/binapi/ip/ip_rpc.ba.go index 6429f0c..d40089b 100644 --- a/binapi/ip/ip_rpc.ba.go +++ b/binapi/ip/ip_rpc.ba.go @@ -114,6 +114,10 @@ func (c *serviceClient_IPAddressDumpClient) Recv() (*IPAddressDetails, error) { case *IPAddressDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -162,6 +166,10 @@ func (c *serviceClient_IPContainerProxyDumpClient) Recv() (*IPContainerProxyDeta case *IPContainerProxyDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -201,6 +209,10 @@ func (c *serviceClient_IPDumpClient) Recv() (*IPDetails, error) { case *IPDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -249,6 +261,10 @@ func (c *serviceClient_IPMrouteDumpClient) Recv() (*IPMrouteDetails, error) { case *IPMrouteDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -288,6 +304,10 @@ func (c *serviceClient_IPMtableDumpClient) Recv() (*IPMtableDetails, error) { case *IPMtableDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -324,6 +344,10 @@ func (c *serviceClient_IPPathMtuGetClient) Recv() (*IPPathMtuDetails, error) { case *IPPathMtuDetails: return m, nil case *IPPathMtuGetReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -408,6 +432,10 @@ func (c *serviceClient_IPPuntRedirectDumpClient) Recv() (*IPPuntRedirectDetails, case *IPPuntRedirectDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -492,6 +520,10 @@ func (c *serviceClient_IPRouteDumpClient) Recv() (*IPRouteDetails, error) { case *IPRouteDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -549,6 +581,10 @@ func (c *serviceClient_IPRouteV2DumpClient) Recv() (*IPRouteV2Details, error) { case *IPRouteV2Details: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -615,6 +651,10 @@ func (c *serviceClient_IPTableDumpClient) Recv() (*IPTableDetails, error) { case *IPTableDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -681,6 +721,10 @@ func (c *serviceClient_IPUnnumberedDumpClient) Recv() (*IPUnnumberedDetails, err case *IPUnnumberedDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) @@ -720,6 +764,10 @@ func (c *serviceClient_MfibSignalDumpClient) Recv() (*MfibSignalDetails, error) case *MfibSignalDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m) |