mirror of https://github.com/v2ray/v2ray-core
still close connection agressively
parent
e12e5a0ecb
commit
24653aef21
|
@ -22,6 +22,7 @@ func (this *FreedomConnection) Dispatch(firstPacket v2net.Packet, ray ray.Outbou
|
||||||
log.Error("Freedom: Failed to open connection: %s : %v", firstPacket.Destination().String(), err)
|
log.Error("Freedom: Failed to open connection: %s : %v", firstPacket.Destination().String(), err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
input := ray.OutboundInput()
|
input := ray.OutboundInput()
|
||||||
output := ray.OutboundOutput()
|
output := ray.OutboundOutput()
|
||||||
|
@ -78,11 +79,10 @@ func (this *FreedomConnection) Dispatch(firstPacket v2net.Packet, ray ray.Outbou
|
||||||
}
|
}
|
||||||
|
|
||||||
writeMutex.Lock()
|
writeMutex.Lock()
|
||||||
//if tcpConn, ok := conn.(*net.TCPConn); ok {
|
if tcpConn, ok := conn.(*net.TCPConn); ok {
|
||||||
// tcpConn.CloseWrite()
|
tcpConn.CloseWrite()
|
||||||
//}
|
}
|
||||||
readMutex.Lock()
|
readMutex.Lock()
|
||||||
conn.Close()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue