diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index cbd67732..5823859a 100644 --- a/server/server.go +++ b/server/server.go @@ -106,7 +106,9 @@ func (server *BgpServer) Serve() { server.bgpConfig.Global = <-server.globalTypeCh listenerMap := make(map[string]*net.TCPListener) - acceptCh := make(chan *net.TCPConn) + // workaround: we should close an accepted connection + // immediately if we are not in the state we continue? + acceptCh := make(chan *net.TCPConn, 4) l4, err1 := listenAndAccept("tcp4", server.listenPort, acceptCh) listenerMap["tcp4"] = l4 l6, err2 := listenAndAccept("tcp6", server.listenPort, acceptCh) |