Commit ec85e0bb authored by Jeromy's avatar Jeromy
Browse files

bump yamux backlog setting way up

parent 955ae93a
Showing with 16 additions and 15 deletions
+16 -15
......@@ -38,7 +38,7 @@ func init() {
msstpt := psmss.NewBlankTransport()
ymxtpt := &yamux.Transport{
AcceptBacklog: 2048,
AcceptBacklog: 8192,
ConnectionWriteTimeout: time.Second * 10,
KeepAliveInterval: time.Second * 30,
EnableKeepAlive: true,
......
......@@ -12,8 +12,9 @@ import (
ps "gx/ipfs/QmZK81vcgMhpb2t7GNbozk7qzt6Rj4zFqitpvsWT9mduW8/go-peerstream"
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
ma "gx/ipfs/QmcobAGsCjYt5DXoq9et9L8yR8er7o7Cu3DTvpaq12jYSz/go-multiaddr"
) // Open listeners and reuse-dialers for the given addresses
)
// Open listeners and reuse-dialers for the given addresses
func (s *Swarm) setupInterfaces(addrs []ma.Multiaddr) error {
errs := make([]error, len(addrs))
var succeeded int
......@@ -152,7 +153,7 @@ func (s *Swarm) connHandler(c *ps.Conn) *Conn {
if err != nil {
log.Debug(err)
log.Event(ctx, "newConnHandlerDisconnect", lgbl.NetConn(c.NetConn()), lgbl.Error(err))
c.Close() // boom. close it.
c.Close() // boom. close it.
return nil
}
......
......@@ -35,20 +35,20 @@ func EchoStreamHandler(stream inet.Stream) {
}
type sendChans struct {
send chan struct{}
sent chan struct{}
read chan struct{}
close_ chan struct{}
closed chan struct{}
send chan struct{}
sent chan struct{}
read chan struct{}
close_ chan struct{}
closed chan struct{}
}
func newSendChans() sendChans {
return sendChans{
send: make(chan struct{}),
sent: make(chan struct{}),
read: make(chan struct{}),
close_: make(chan struct{}),
closed: make(chan struct{}),
send: make(chan struct{}),
sent: make(chan struct{}),
read: make(chan struct{}),
close_: make(chan struct{}),
closed: make(chan struct{}),
}
}
......@@ -188,7 +188,7 @@ func SubtestConnSendDisc(t *testing.T, hosts []host.Host) {
go sF(s)
log.Debugf("getting handle %d", j)
sc := <-ss // wait to get handle.
sc := <-ss // wait to get handle.
log.Debugf("spawning worker %d", j)
for k := 0; k < numMsgs; k++ {
......@@ -215,7 +215,7 @@ func SubtestConnSendDisc(t *testing.T, hosts []host.Host) {
for _, c := range cs {
sc := c.(*swarm.Conn)
if sc.LocalPeer() > sc.RemotePeer() {
continue // only close it on one side.
continue // only close it on one side.
}
log.Debugf("closing: %s", sc.RawConn())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment