mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-13 04:24:09 +08:00
Chore(iobased): use MTU()
This commit is contained in:
@@ -56,7 +56,7 @@ func (e *Endpoint) IsAttached() bool {
|
|||||||
// dispatchLoop dispatches packets to upper layer.
|
// dispatchLoop dispatches packets to upper layer.
|
||||||
func (e *Endpoint) dispatchLoop() {
|
func (e *Endpoint) dispatchLoop() {
|
||||||
for {
|
for {
|
||||||
packet := make([]byte, e.mtu)
|
packet := make([]byte, e.MTU())
|
||||||
|
|
||||||
n, err := e.rw.Read(packet)
|
n, err := e.rw.Read(packet)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user