crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

commit 6cf4d65d53b384eff1b95e4010ebe650213e2560
parent 9e312385bdad58077b1ac94ff2324dbc0bb6c296
Author: finwo <finwo@pm.me>
Date:   Sat,  3 Jan 2026 19:38:32 +0100

2.65

Diffstat:
MChangeLog | 5+++++
MMakefile | 2+-
Mxr/backend/connect.cc | 12++++++++----
3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2.65 [KK 2010-04-26] +- Bugfix in backend/connect.cc - if the determination whether a back + end is available goes haywire, the client socket may stay open and + not be consumed. Thanks Franz J. for reporting! + 2.64 [KK 2010-01-29] - Fixed signal handling for start/stop/restart. - Web interface now immediately shuts down at a stop request, so that diff --git a/Makefile b/Makefile @@ -1,7 +1,7 @@ # Top-level Makefile for XR # ------------------------- -VER = 2.64 +VER = 2.65 PREFIX = $(DESTDIR)/usr BINDIR = $(PREFIX)/sbin MANDIR = $(PREFIX)/share/man diff --git a/xr/backend/connect.cc b/xr/backend/connect.cc @@ -6,7 +6,7 @@ bool Backend::connect() { // Assume the backend is dead islive = false; - debugmsg ("Connecting to back end " + description() + "\n"); + debugmsg ("About to connect to back end " + description() + "\n"); // Create client socket if ( (clsocket = socket (PF_INET, SOCK_STREAM, 0)) < 0 ) @@ -54,18 +54,22 @@ bool Backend::connect() { fdset.add (clsocket); fdset.wait_rw(); - debugmsg(Mstr("Connectiong to ") + description() + "\n"); + debugmsg(Mstr("Connecting to ") + description() + "\n"); # ifdef CONNECTCHECK_ONLY_WRITABLE if (fdset.writeable(clsocket)) islive = true; - else + else { markconnecterror(); + socketclose(clsocket); + } # else if (fdset.writeable(clsocket) && !fdset.readable(clsocket)) islive = true; - else + else { + socketclose(clsocket); markconnecterror(); + } # endif }