Unverified Commit 88df7c35 authored by zhanb's avatar zhanb Committed by GitHub

Update transport.cc (#783)

* Update transport.cc

fix throw but no catch bug

* Update transport.cc

disconnect peers for all other errors

* adjust indent level
Co-authored-by: default avatarzhanb <zhangbo@caict.ac.cn>
parent 70b1e068
......@@ -139,11 +139,7 @@ void Transport::handleIncoming(const std::shared_ptr<Peer> &peer) {
handler_->onInput(buffer, totalBytes, peer);
}
} else {
if (errno == ECONNRESET) {
handlePeerDisconnection(peer);
} else {
throw std::runtime_error(strerror(errno));
}
handlePeerDisconnection(peer);
}
break;
} else if (bytes == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment