h2load: Don't retry connection on read error

Connection failure is handled by connected() and other errors lead to
just failure, no retry is needed.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-10 16:02:15 +09:00
parent a3dcf1e004
commit b933ee8e78
2 changed files with 1 additions and 13 deletions

View File

@ -455,17 +455,6 @@ int Client::on_connect() {
return 0;
}
int Client::on_net_error() {
if (state == CLIENT_IDLE) {
disconnect();
if (connect() == 0) {
return 0;
}
}
debug("error/eof\n");
return -1;
}
int Client::on_read(const uint8_t *data, size_t len) {
auto rv = session->on_read(data, len);
if (rv != 0) {
@ -494,7 +483,7 @@ int Client::read_clear() {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
return 0;
}
return on_net_error();
return -1;
}
if (nread == 0) {

View File

@ -175,7 +175,6 @@ struct Client {
int on_read(const uint8_t *data, size_t len);
int on_write();
int on_connect();
int on_net_error();
int noop();
void on_request(int32_t stream_id);