From ba4281b5bfbb4b9fba6c9800a32e12918bd52cd6 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 31 Mar 2005 21:17:19 +0000 Subject: [PATCH] on connect, we only connect if we're not already connected git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@262 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libstack/osrf_app_session.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libstack/osrf_app_session.c b/src/libstack/osrf_app_session.c index 30e5b23..f4da4b4 100644 --- a/src/libstack/osrf_app_session.c +++ b/src/libstack/osrf_app_session.c @@ -461,6 +461,11 @@ int osrf_app_session_connect(osrf_app_session* session){ if(session == NULL) return 0; + if(session->state == OSRF_SESSION_CONNECTED) { + debug_handler("Already Connected, returning"); + return 1; + } + int timeout = 5; /* XXX CONFIG VALUE */ debug_handler( "AppSession connecting to %s", session->remote_id ); -- 2.11.0