summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-12-12 23:07:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-12-12 23:54:24 +0900
commite33c13b85a5188305ee698061ffffcb968d2979b (patch)
tree0f4c0a7f2ddcc1c2d217fa1531ef3f6bd90f1fd2 /server
parentdb35c8b954806000abdb7a1c63188ad5948a0714 (diff)
server: handle lots of peers trying to connect
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index c25652ed..beeb85dc 100644
--- a/server/server.go
+++ b/server/server.go
@@ -218,7 +218,7 @@ func (server *BgpServer) Serve() {
rfs, _ := g.AfiSafis.ToRfList()
server.globalRib = table.NewTableManager(rfs, g.MplsLabelRange.MinLabel, g.MplsLabelRange.MaxLabel)
server.listenerMap = make(map[string]*net.TCPListener)
- acceptCh := make(chan *net.TCPConn)
+ acceptCh := make(chan *net.TCPConn, 4096)
l4, err1 := listenAndAccept("tcp4", server.listenPort, acceptCh)
server.listenerMap["tcp4"] = l4
l6, err2 := listenAndAccept("tcp6", server.listenPort, acceptCh)