Skip to content

Commit 0fc1647

Browse files
committed
fix active flag in udp relay and udp copy
1 parent f5573ce commit 0fc1647

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/g3-io-ext/src/udp/copy/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ impl UdpCopyBuffer {
342342
self.recv_done = true;
343343
}
344344
self.send_end += count;
345+
self.active = true;
345346
}
346347
Poll::Ready(Err(e)) => return Poll::Ready(Err(e)),
347348
Poll::Pending => {
@@ -361,6 +362,7 @@ impl UdpCopyBuffer {
361362
.map(|p| p.buf_data_end - p.buf_data_off)
362363
.sum::<usize>();
363364
self.send_start += count;
365+
self.active = true;
364366
}
365367
self.send_start = 0;
366368
self.send_end = 0;

lib/g3-io-ext/src/udp/relay/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ impl UdpRelayBuffer {
354354
self.recv_done = true;
355355
}
356356
self.send_end += count;
357+
self.active = true;
357358
}
358359
Poll::Ready(Err(e)) => return Poll::Ready(Err(e)),
359360
Poll::Pending => {
@@ -373,6 +374,7 @@ impl UdpRelayBuffer {
373374
.map(|p| p.buf_data_end - p.buf_data_off)
374375
.sum::<usize>();
375376
self.send_start += count;
377+
self.active = true;
376378
}
377379
self.send_start = 0;
378380
self.send_end = 0;

0 commit comments

Comments
 (0)