Chore(iobased): use MTU()

This commit is contained in:
xjasonlyu
2022-01-29 21:00:43 +08:00
parent e3007f0498
commit 40dfe8807a

View File

@@ -56,7 +56,7 @@ func (e *Endpoint) IsAttached() bool {
// dispatchLoop dispatches packets to upper layer.
func (e *Endpoint) dispatchLoop() {
for {
packet := make([]byte, e.mtu)
packet := make([]byte, e.MTU())
n, err := e.rw.Read(packet)
if err != nil {