From: erickson Date: Thu, 31 Mar 2005 21:17:19 +0000 (+0000) Subject: on connect, we only connect if we're not already connected X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ba4281b5bfbb4b9fba6c9800a32e12918bd52cd6;p=opensrf%2Fbjwebb.git 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 --- 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 );