Browse Source

check empty

pull/1524/head^2
Darien Raymond 6 years ago
parent
commit
3b0bfe9422
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 3
      transport/internet/kcp/receiving.go

3
transport/internet/kcp/receiving.go

@ -205,6 +205,9 @@ func (w *ReceivingWorker) ReadMultiBuffer() buf.MultiBuffer {
func (w *ReceivingWorker) Read(b []byte) int {
mb := w.ReadMultiBuffer()
if mb.IsEmpty() {
return 0
}
nBytes, err := mb.Read(b)
common.Must(err)
if !mb.IsEmpty() {

Loading…
Cancel
Save