mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
fix: shutdown the tcpstream when we initiate to close a peer connection (#2288)
This commit is contained in:
parent
3b4492495f
commit
6165c0873c
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::net::TcpStream;
|
||||
use std::net::{Shutdown, TcpStream};
|
||||
use std::sync::{mpsc, Arc};
|
||||
use std::{cmp, thread, time};
|
||||
|
||||
|
@ -291,6 +291,7 @@ fn poll<H>(
|
|||
.map(|a| a.to_string())
|
||||
.unwrap_or("?".to_owned())
|
||||
);
|
||||
let _ = conn.shutdown(Shutdown::Both);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue