Changeset 3 for trunk/pbs_drmaa/submit.c


Ignore:
Timestamp:
02/02/11 22:37:40 (11 years ago)
Author:
mmamonski
Message:

try to be resistant to torque restarts - avoid double disconnect == double free

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/submit.c

    r1 r3  
    183183                         { 
    184184                                pbsdrmaa_session_t *pbsself = (pbsdrmaa_session_t*)self->session; 
    185                                 pbs_disconnect( pbsself->pbs_conn ); 
     185                                if (pbsself->pbs_conn >= 0 ) 
     186                                        pbs_disconnect( pbsself->pbs_conn ); 
    186187                                sleep(1); 
    187188                                pbsself->pbs_conn = pbs_connect( pbsself->super.contact ); 
Note: See TracChangeset for help on using the changeset viewer.