We're flushing and shutting down twice
This commit is contained in:
parent
d947a147c7
commit
b2db3cb046
@ -26,8 +26,6 @@ fn main() {
|
|||||||
match serde_json::Deserializer::from_reader(&mut stream).into_iter().next().unwrap() {
|
match serde_json::Deserializer::from_reader(&mut stream).into_iter().next().unwrap() {
|
||||||
Ok(Packet { p_type: PacketType::GetFile, json }) => {
|
Ok(Packet { p_type: PacketType::GetFile, json }) => {
|
||||||
send_chunk(&data_path, &mut stream, &json.unwrap());
|
send_chunk(&data_path, &mut stream, &json.unwrap());
|
||||||
stream.flush().unwrap();
|
|
||||||
stream.shutdown(Shutdown::Write).unwrap();
|
|
||||||
}
|
}
|
||||||
Ok(Packet { p_type: PacketType::PutFile, json }) => {
|
Ok(Packet { p_type: PacketType::PutFile, json }) => {
|
||||||
println!("Receiving chunk");
|
println!("Receiving chunk");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user