Error handling for failing writes with SSL

pull/1404/merge
René Cannaò 8 years ago
parent 245a80538a
commit cd44fcf470

@ -546,8 +546,13 @@ int MySQL_Data_Stream::write_to_net() {
//}
//bytes_io += n;
} else {
shut_soft();
return -1;
int myds_errno=errno;
if (n==0 || (n==-1 && myds_errno != EINTR && myds_errno != EAGAIN)) {
shut_soft();
return 0;
} else {
return -1;
}
}
}
} else {
@ -681,8 +686,13 @@ int MySQL_Data_Stream::write_to_net_poll() {
rc = n; // and continue
}
} else {
shut_soft();
return -1;
int myds_errno=errno;
if (n==0 || (n==-1 && myds_errno != EINTR && myds_errno != EAGAIN)) {
shut_soft();
return 0;
} else {
return -1;
}
}
}
}

Loading…
Cancel
Save