inconshreveable / muxado

Stream multiplexing for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Infinite recursion in netListenerAdaptor.Accept

raff opened this issue · comments

This code in proto/session.go:

func (a *netListenerAdaptor) Accept() (net.Conn, error) {
str, err := a.Accept()
return net.Conn(str), err
}

should be:

func (a *netListenerAdaptor) Accept() (net.Conn, error) {
str, err := a.Session.Accept()
return net.Conn(str), err
}

or you end up calling yourself over and over.

Fixed in 7c45696 with a verifying test. Thanks for catching this!