- Add a a backported patch from cups 1.6 which fixes an issue with regard to a timed out TCP connection. it should be deleted once the port is updated to 1.6. - Pet portlint a bit - remove unused CONFLICTS line PR: 178987 Submitted by: "r4721@tormail.org" <r4721@tormail.org> PR: 179194 Submitted by: Sayetsky Anton <vsjcfm@gmail.com> Approved by: c.petrik.sosa@gmail.com (maintainer)
28 lines
523 B
C
28 lines
523 B
C
--- cups/request.c
|
|
+++ cups/request.c
|
|
@@ -1004,6 +1004,25 @@
|
|
httpClose(cg->http);
|
|
cg->http = NULL;
|
|
}
|
|
+ else
|
|
+ {
|
|
+ /*
|
|
+ * Same server, see if the connection is still established...
|
|
+ */
|
|
+
|
|
+ char ch; /* Connection check byte */
|
|
+
|
|
+ if (recv(cg->http->fd, &ch, 1, MSG_PEEK | MSG_DONTWAIT) < 0 &&
|
|
+ errno != EWOULDBLOCK)
|
|
+ {
|
|
+ /*
|
|
+ * Nope, close the connection...
|
|
+ */
|
|
+
|
|
+ httpClose(cg->http);
|
|
+ cg->http = NULL;
|
|
+ }
|
|
+ }
|
|
}
|
|
|
|
/*
|