projects
/
cubemap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad06eb6
)
Fix a socket leak in HTTPInput.
author
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Sat, 13 Apr 2013 19:50:13 +0000
(21:50 +0200)
committer
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Sat, 13 Apr 2013 19:50:13 +0000
(21:50 +0200)
httpinput.cpp
patch
|
blob
|
history
diff --git
a/httpinput.cpp
b/httpinput.cpp
index
9d39774
..
291b17f
100644
(file)
--- a/
httpinput.cpp
+++ b/
httpinput.cpp
@@
-114,6
+114,15
@@
int HTTPInput::lookup_and_connect(const string &host, const string &port)
return sock;
}
+ do {
+ err = close(sock);
+ } while (err == -1 && errno == EINTR);
+
+ if (err == -1) {
+ perror("close");
+ // Can still continue.
+ }
+
ai = ai->ai_next;
}