Skip to content

Commit c213352

Browse files
committed
Merge pull request open-mpi#753 from jsquyres/pr/v2.x/pmix-destructor-ordering-fix
pmix: fix finalize ordering issue
2 parents 3b21e98 + 701bcd6 commit c213352

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

opal/mca/pmix/pmix1xx/pmix/src/client/pmix_client.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014 Artem Y. Polyakov <[email protected]>.
77
* All rights reserved.
8+
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
89
* $COPYRIGHT$
910
*
1011
* Additional copyrights may follow
@@ -404,10 +405,6 @@ pmix_status_t PMIx_Finalize(void)
404405
}
405406

406407
pmix_stop_progress_thread(pmix_globals.evbase);
407-
event_base_free(pmix_globals.evbase);
408-
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
409-
libevent_global_shutdown();
410-
#endif
411408

412409
pmix_usock_finalize();
413410
PMIX_DESTRUCT(&pmix_client_globals.myserver);
@@ -416,6 +413,12 @@ pmix_status_t PMIx_Finalize(void)
416413
if (0 <= pmix_client_globals.myserver.sd) {
417414
CLOSE_THE_SOCKET(pmix_client_globals.myserver.sd);
418415
}
416+
417+
event_base_free(pmix_globals.evbase);
418+
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
419+
libevent_global_shutdown();
420+
#endif
421+
419422
pmix_bfrop_close();
420423
pmix_sec_finalize();
421424

0 commit comments

Comments
 (0)