|
|
@ -128,20 +128,23 @@ func (c *udpConn) updateActivity() {
|
|
|
|
func (c *udpConn) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
|
|
|
func (c *udpConn) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
|
|
|
var payload buf.MultiBuffer
|
|
|
|
var payload buf.MultiBuffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select {
|
|
|
|
|
|
|
|
case in := <-c.input:
|
|
|
|
|
|
|
|
payload.Append(in)
|
|
|
|
|
|
|
|
default:
|
|
|
|
select {
|
|
|
|
select {
|
|
|
|
case in := <-c.input:
|
|
|
|
case in := <-c.input:
|
|
|
|
payload.Append(in)
|
|
|
|
payload.Append(in)
|
|
|
|
case <-c.done.Wait():
|
|
|
|
case <-c.done.Wait():
|
|
|
|
return nil, io.EOF
|
|
|
|
return nil, io.EOF
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
L:
|
|
|
|
L:
|
|
|
|
for {
|
|
|
|
for {
|
|
|
|
select {
|
|
|
|
select {
|
|
|
|
case in := <-c.input:
|
|
|
|
case in := <-c.input:
|
|
|
|
payload.Append(in)
|
|
|
|
payload.Append(in)
|
|
|
|
case <-c.done.Wait():
|
|
|
|
|
|
|
|
break L
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break L
|
|
|
|
break L
|
|
|
|
}
|
|
|
|
}
|
|
|
|