|
10 | 10 | * University of Stuttgart. All rights reserved.
|
11 | 11 | * Copyright (c) 2004-2005 The Regents of the University of California.
|
12 | 12 | * All rights reserved.
|
13 |
| - * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights |
| 13 | + * Copyright (c) 2006-2017 Los Alamos National Security, LLC. All rights |
14 | 14 | * reserved.
|
15 | 15 | * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
16 | 16 | * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
@@ -182,22 +182,9 @@ static int tcp_component_open(void)
|
182 | 182 | */
|
183 | 183 | static int tcp_component_close(void)
|
184 | 184 | {
|
185 |
| - mca_oob_tcp_peer_t *peer; |
186 |
| - uint64_t ui64; |
187 |
| - |
188 | 185 | /* cleanup listen event list */
|
189 | 186 | OBJ_DESTRUCT(&mca_oob_tcp_component.listeners);
|
190 | 187 |
|
191 |
| - /* cleanup all peers */ |
192 |
| - OPAL_HASH_TABLE_FOREACH(ui64, uint64, peer, &mca_oob_tcp_component.peers) { |
193 |
| - opal_output_verbose(2, orte_oob_base_framework.framework_output, |
194 |
| - "%s RELEASING PEER OBJ %s", |
195 |
| - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), |
196 |
| - (NULL == peer) ? "NULL" : ORTE_NAME_PRINT(&peer->name)); |
197 |
| - if (NULL != peer) { |
198 |
| - OBJ_RELEASE(peer); |
199 |
| - } |
200 |
| - } |
201 | 188 | OBJ_DESTRUCT(&mca_oob_tcp_component.peers);
|
202 | 189 |
|
203 | 190 | if (NULL != mca_oob_tcp_component.ipv4conns) {
|
@@ -722,13 +709,26 @@ static void cleanup(int sd, short args, void *cbdata)
|
722 | 709 |
|
723 | 710 | static void component_shutdown(void)
|
724 | 711 | {
|
| 712 | + mca_oob_tcp_peer_t *peer; |
| 713 | + uint64_t ui64; |
725 | 714 | int i = 0;
|
726 | 715 | bool active;
|
727 | 716 |
|
728 | 717 | opal_output_verbose(2, orte_oob_base_framework.framework_output,
|
729 | 718 | "%s TCP SHUTDOWN",
|
730 | 719 | ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
|
731 | 720 |
|
| 721 | + /* cleanup all peers */ |
| 722 | + OPAL_HASH_TABLE_FOREACH(ui64, uint64, peer, &mca_oob_tcp_component.peers) { |
| 723 | + opal_output_verbose(2, orte_oob_base_framework.framework_output, |
| 724 | + "%s RELEASING PEER OBJ %s", |
| 725 | + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), |
| 726 | + (NULL == peer) ? "NULL" : ORTE_NAME_PRINT(&peer->name)); |
| 727 | + if (NULL != peer) { |
| 728 | + OBJ_RELEASE(peer); |
| 729 | + } |
| 730 | + } |
| 731 | + |
732 | 732 | if (0 < orte_oob_base.num_threads) {
|
733 | 733 | for (i=0; i < orte_oob_base.num_threads; i++) {
|
734 | 734 | opal_progress_thread_finalize(mca_oob_tcp_component.ev_threads[i]);
|
|
0 commit comments