Index: trunk/pbs_drmaa/pbs_conn.c
===================================================================
--- trunk/pbs_drmaa/pbs_conn.c	(revision 86)
+++ trunk/pbs_drmaa/pbs_conn.c	(revision 87)
@@ -53,5 +53,5 @@
 static void pbsdrmaa_pbs_holdjob( pbsdrmaa_pbs_conn_t *self,  char *job_id );
 
-static void pbsdrmaa_pbs_connection_autoclose_thread_loop( pbsdrmaa_pbs_conn_t *self, bool reconnect);
+/* static void pbsdrmaa_pbs_connection_autoclose_thread_loop( pbsdrmaa_pbs_conn_t *self, bool reconnect); */
 
 
@@ -111,5 +111,8 @@
 
 			if (self->connection_fd != -1)
+			  {
+	                        fsd_log_info(( "pbs_disconnect(%d)", self->connection_fd ));
 				pbs_disconnect(self->connection_fd);
+			  }
 		  }
 			
@@ -132,9 +135,12 @@
 		if(self != NULL)
 		{
+			if (self->connection_fd != -1)
+			  {
+				fsd_log_info(( "pbs_disconnect(%d)", self->connection_fd ));
+				pbs_disconnect(self->connection_fd);
+
+			  }
 			fsd_free(self->server);
 			fsd_free(self);	
-
-			if (self->connection_fd != -1)
-				pbs_disconnect(self->connection_fd);
 		}
 	}
@@ -220,5 +226,5 @@
 		status = pbs_statjob(self->connection_fd, job_id, attrib, NULL);
 
-		fsd_log_info(( "pbs_statjob( fd=%d, job_id=%s, attribs={...} ) =%p", self->connection_fd, job_id, (void*)status));
+		fsd_log_info(( "pbs_statjob( fd=%d, job_id=%s, attribs={...} ) = %p", self->connection_fd, job_id, (void*)status));
 
 		if(status == NULL)
@@ -230,5 +236,5 @@
 			else if (IS_TRANSIENT_ERROR && first_try)
 			 {
-				fsd_log_error(( "pbs_statjob failed, pbs_errno = %d", pbs_errno ));
+				fsd_log_info(( "pbs_statjob failed, pbs_errno = %d, retrying", pbs_errno ));
 				check_reconnect(self, true);
 				first_try = false;
@@ -344,7 +350,7 @@
 		if(rc != PBSE_NONE)
 		 {
-			fsd_log_error(( "pbs_deljob failed, rc = %d, pbs_errno = %d", rc, pbs_errno ));
 			if (IS_TRANSIENT_ERROR && first_try)
 			 {
+				fsd_log_info(( "pbs_deljob failed, rc = %d, pbs_errno = %d. Retrying...", rc, pbs_errno ));
 				check_reconnect(self, true);
 				first_try = false;
@@ -491,5 +497,5 @@
 		else
 		 {
-			stop_autoclose_thread(self);
+			fsd_log_info(( "pbs_disconnect(%d)", self->connection_fd ));
 			pbs_disconnect(self->connection_fd);
 			self->connection_fd = -1;
@@ -501,5 +507,5 @@
 retry_connect: /* Life... */
 	self->connection_fd = pbs_connect( self->server );
-	fsd_log_info(( "pbs_connect(%s) =%d", self->server, self->connection_fd ));
+	fsd_log_info(( "pbs_connect(%s) = %d", self->server, self->connection_fd ));
 	if( self->connection_fd < 0 && tries_left-- )
 	  {
Index: trunk/pbs_drmaa/submit.c
===================================================================
--- trunk/pbs_drmaa/submit.c	(revision 85)
+++ trunk/pbs_drmaa/submit.c	(revision 87)
@@ -206,6 +206,4 @@
 
 		job_id = ((pbsdrmaa_session_t *)self->session)->pbs_connection->submit( ((pbsdrmaa_session_t *)self->session)->pbs_connection, (struct attropl*)pbs_attr, self->script_filename, self->destination_queue);
-
-		fsd_log_info(("pbs_submit(%s, %s) =%s", self->script_filename, self->destination_queue, job_id));
 
 	 }
Index: trunk/pbs_drmaa/job.c
===================================================================
--- trunk/pbs_drmaa/job.c	(revision 85)
+++ trunk/pbs_drmaa/job.c	(revision 87)
@@ -82,37 +82,34 @@
 	fsd_log_enter(( "({job_id=%s}, action=%d)", self->job_id, action ));
 
-	while ( true )
-	 {
-		switch( action )
-		 {
-			/*
-			 * We cannot know whether we did suspend job
-			 * in other way than remembering this inside DRMAA session.
-			 */
-			case DRMAA_CONTROL_SUSPEND:
-				session->pbs_connection->sigjob( session->pbs_connection, (char*)job_id, "SIGSTOP");
-				self->flags |= FSD_JOB_SUSPENDED;
-				break;
-			case DRMAA_CONTROL_RESUME:
-				session->pbs_connection->sigjob( session->pbs_connection, (char*)job_id, "SIGCONT");
-				self->flags &= ~FSD_JOB_SUSPENDED;
-				break;
-			case DRMAA_CONTROL_HOLD:
-				session->pbs_connection->holdjob( session->pbs_connection, (char*)job_id );
-				self->flags |= FSD_JOB_HOLD;
-				break;
-			case DRMAA_CONTROL_RELEASE:
-				session->pbs_connection->rlsjob( session->pbs_connection, (char*)job_id );
-				self->flags &= ~FSD_JOB_HOLD;
-				break;
-			case DRMAA_CONTROL_TERMINATE:
-				session->pbs_connection->deljob( session->pbs_connection, (char*)job_id );
-				/* TODO: make deldelay configurable ???:
-				 * deldelay=N -- delay between SIGTERM and SIGKILL (default 0) */
-				self->flags &= FSD_JOB_TERMINATED_MASK;
-				if( (self->flags & FSD_JOB_TERMINATED) == 0 )
-					self->flags |= FSD_JOB_TERMINATED | FSD_JOB_ABORTED;
-				break;
-		 }
+	switch( action )
+	 {
+		/*
+		 * We cannot know whether we did suspend job
+		 * in other way than remembering this inside DRMAA session.
+		 */
+		case DRMAA_CONTROL_SUSPEND:
+			session->pbs_connection->sigjob( session->pbs_connection, (char*)job_id, "SIGSTOP");
+			self->flags |= FSD_JOB_SUSPENDED;
+			break;
+		case DRMAA_CONTROL_RESUME:
+			session->pbs_connection->sigjob( session->pbs_connection, (char*)job_id, "SIGCONT");
+			self->flags &= ~FSD_JOB_SUSPENDED;
+			break;
+		case DRMAA_CONTROL_HOLD:
+			session->pbs_connection->holdjob( session->pbs_connection, (char*)job_id );
+			self->flags |= FSD_JOB_HOLD;
+			break;
+		case DRMAA_CONTROL_RELEASE:
+			session->pbs_connection->rlsjob( session->pbs_connection, (char*)job_id );
+			self->flags &= ~FSD_JOB_HOLD;
+			break;
+		case DRMAA_CONTROL_TERMINATE:
+			session->pbs_connection->deljob( session->pbs_connection, (char*)job_id );
+			/* TODO: make deldelay configurable ???:
+			 * deldelay=N -- delay between SIGTERM and SIGKILL (default 0) */
+			self->flags &= FSD_JOB_TERMINATED_MASK;
+			if( (self->flags & FSD_JOB_TERMINATED) == 0 )
+				self->flags |= FSD_JOB_TERMINATED | FSD_JOB_ABORTED;
+			break;
 	 }
 
