1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 22:36:12 -04:00

check empty

This commit is contained in:
Darien Raymond 2018-07-29 15:10:06 +02:00
parent 47f1399995
commit 3b0bfe9422
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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() {