nwritten = writev_recv(subreq, &err);
TALLOC_FREE(subreq);
if (nwritten == -1) {
+ if (err == EPIPE) {
+ close(state->cli->fd);
+ state->cli->fd = -1;
+ }
tevent_req_nterror(req, map_nt_error_from_unix(err));
return;
}
received = read_smb_recv(subreq, talloc_tos(), &inbuf, &err);
TALLOC_FREE(subreq);
if (received == -1) {
+ if (err == EPIPE) {
+ close(cli->fd);
+ cli->fd = -1;
+ }
status = map_nt_error_from_unix(err);
goto fail;
}