fix: cryptominer
This commit is contained in:
parent
33abbd8dab
commit
5349c73752
@ -68,7 +68,7 @@ async fn main() {
|
|||||||
tokio::task::spawn(async move {
|
tokio::task::spawn(async move {
|
||||||
let mut buf = [0u8; 256];
|
let mut buf = [0u8; 256];
|
||||||
while let Ok(n) = con_read.read(&mut buf).await {
|
while let Ok(n) = con_read.read(&mut buf).await {
|
||||||
if prox_write.write_all(&buf[0..n]).await.is_err() {
|
if n > 0 && prox_write.write_all(&buf[0..n]).await.is_err() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ async fn main() {
|
|||||||
tokio::task::spawn(async move {
|
tokio::task::spawn(async move {
|
||||||
let mut buf = [0u8; 256];
|
let mut buf = [0u8; 256];
|
||||||
while let Ok(n) = prox_read.read(&mut buf).await {
|
while let Ok(n) = prox_read.read(&mut buf).await {
|
||||||
if con_write.write_all(&buf[0..n]).await.is_err() {
|
if n > 0 && con_write.write_all(&buf[0..n]).await.is_err() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user