mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-10-21 05:09:09 +00:00
fix udp broken
This commit is contained in:
@@ -187,6 +187,15 @@ func (c *udpConn) Write(buf []byte) (int, error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
// Implements buf.ActivityNotifiable
|
||||
func (c *udpConn) NotifyActivity() error {
|
||||
if c.done.Done() {
|
||||
return newError("connection is already closed")
|
||||
}
|
||||
c.updateActivity()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *udpConn) Close() error {
|
||||
common.Must(c.done.Close())
|
||||
common.Must(common.Close(c.writer))
|
||||
|
||||
Reference in New Issue
Block a user