Commit 928dd90ae878d10b05b3fb734b184dc7f6a6a046

Carlos Martín Nieto 2011-09-09T13:17:58

netops: store the error if gitno_send fails Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/netops.c b/src/netops.c
index 3e6b935..4e6fe9d 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -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;
 	}