commit df260424530daa7c6c6831824834dd869cc7e5ab
parent aeb9d0382b9a6b7d8b7739ac94147701dd024688
Author: finwo <finwo@pm.me>
Date: Sat, 3 Jan 2026 19:36:59 +0100
2.37
Diffstat:
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2.37 [KK 2008-11-17]
+- Main accept-loop in Balancer::serve() doesn't throw an exception
+ when a network connection can't be accepted. The reason is shown in
+ a warnmsg().
+
2.36 [KK 2008-11-11]
- Typo bugfix in xrctl, fixed.
- xrctl will take the environment's PATH if no path is given in the
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
# Top-level Makefile for XR
# -------------------------
-VER = 2.36
+VER = 2.37
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
diff --git a/xr/balancer/serve.cc b/xr/balancer/serve.cc
@@ -80,8 +80,11 @@ void Balancer::serve() {
size = sizeof(clname);
if ( (clsock = accept (server_fd, (struct sockaddr *) &clname,
- (socklen_t*) &size)) < 0 )
- throw static_cast<Error>("Failed to accept network connection");
+ (socklen_t*) &size)) < 0 ) {
+ warnmsg(Mstr("Failed to accept network connection: ") +
+ Mstr(strerror(errno)) + "\n");
+ continue;
+ }
string clientip = inet_ntoa(clname.sin_addr);