netops: store the error if gitno_send fails

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
Carlos Martín Nieto 2011-09-09 13:17:58 +02:00
parent b8a8191fed
commit 928dd90ae8

View File

@ -140,7 +140,7 @@ int gitno_send(int s, const char *msg, size_t len, int flags)
while (off < len) {
ret = send(s, msg + off, len - off, flags);
if (ret < 0)
return GIT_EOSERR;
return git__throw(GIT_EOSERR, "Error sending data: %s", strerror(errno));
off += ret;
}