mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: add ReaderReplaceable to BufferedConn, avoid buffered data lost
This commit is contained in:
parent
d926d6106f
commit
4135e6978a
|
@ -58,3 +58,10 @@ func (c *BufferedConn) ReadBuffer(buffer *buf.Buffer) (err error) {
|
|||
func (c *BufferedConn) Upstream() any {
|
||||
return c.ExtendedConn
|
||||
}
|
||||
|
||||
func (c *BufferedConn) ReaderReplaceable() bool {
|
||||
if c.r.Buffered() > 0 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user