mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 07:56:37 +08:00
fix(udp): mark connection active on WriteQueue to prevent idle timeout race
This commit is contained in:
@@ -227,6 +227,7 @@ func (c *conn) SetIdle(idle bool) {
|
||||
func (c *conn) WriteQueue(b []byte) error {
|
||||
select {
|
||||
case c.rc <- b:
|
||||
c.SetIdle(false)
|
||||
return nil
|
||||
|
||||
case <-c.closed:
|
||||
|
||||
Reference in New Issue
Block a user