summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
da8b732)
Rather than ending up in an accept() loop that goes nowhere, print
the error we saw and exit.
if (ret != -1) {
ret = listen(fd, 5);
if (ret != -1) {
ret = listen(fd, 5);
- if (ret == -1) {
- close(fd);
- fd = -1;
- }
+ }
+
+ if (ret == -1) {
+ logthing(LOGTHING_ERROR,
+ "Couldn't open socket to listen on: %s (%d)",
+ strerror(errno),
+ errno);
+ close(fd);
+ fd = -1;