From 27c2b257b6a7fcb27ad03b51b67e0a5e1ceb9732 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Wed, 11 Dec 2019 20:04:12 +0300 Subject: [PATCH] Fix a comment --- pkg/router/route_group.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/router/route_group.go b/pkg/router/route_group.go index 00fd22f3b..b07dd78d4 100644 --- a/pkg/router/route_group.go +++ b/pkg/router/route_group.go @@ -113,8 +113,6 @@ func NewRouteGroup(cfg *RouteGroupConfig, rt routing.Table, desc routing.RouteDe // Read reads the next packet payload of a RouteGroup. // The Router, via transport.Manager, is responsible for reading incoming packets and pushing it // to the appropriate RouteGroup via (*RouteGroup).readCh. -// To help with implementing the read logic, within the dmsg repo, we have ioutil.BufRead, -// just in case the read buffer is short. func (r *RouteGroup) Read(p []byte) (n int, err error) { if r.isClosed() { return 0, io.ErrClosedPipe @@ -129,6 +127,7 @@ func (r *RouteGroup) Read(p []byte) (n int, err error) { return 0, nil } + // In case the read buffer is short. r.mu.Lock() if r.readBuf.Len() > 0 { data, err := r.readBuf.Read(p)