oob tcp: re-enable keepalive option for Mac
Plus very minor #if/#endif reduction.
Этот коммит содержится в:
родитель
69e70776aa
Коммит
32d81af35f
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2013 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
@ -72,9 +72,9 @@
|
||||
/**
|
||||
* Set socket buffering
|
||||
*/
|
||||
#if defined(SO_KEEPALIVE) && !defined(__APPLE__)
|
||||
static void set_keepalive(int sd)
|
||||
{
|
||||
#if defined(SO_KEEPALIVE)
|
||||
int option;
|
||||
socklen_t optlen;
|
||||
|
||||
@ -145,8 +145,8 @@ static void set_keepalive(int sd)
|
||||
opal_socket_errno);
|
||||
}
|
||||
#endif // TCP_KEEPCNT
|
||||
}
|
||||
#endif //SO_KEEPALIVE
|
||||
}
|
||||
|
||||
void orte_oob_tcp_set_socket_options(int sd)
|
||||
{
|
||||
@ -182,11 +182,10 @@ void orte_oob_tcp_set_socket_options(int sd)
|
||||
opal_socket_errno);
|
||||
}
|
||||
#endif
|
||||
#if defined(SO_KEEPALIVE) && !defined(__APPLE__)
|
||||
|
||||
if (0 < mca_oob_tcp_component.keepalive_time) {
|
||||
set_keepalive(sd);
|
||||
}
|
||||
#endif // SO_KEEPALIVE
|
||||
}
|
||||
|
||||
mca_oob_tcp_peer_t* mca_oob_tcp_peer_lookup(const orte_process_name_t *name)
|
||||
|
@ -427,7 +427,6 @@ static int tcp_component_register(void)
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
&mca_oob_tcp_component.keepalive_probes);
|
||||
#endif
|
||||
|
||||
mca_oob_tcp_component.retry_delay = 0;
|
||||
(void)mca_base_component_var_register(component, "retry_delay",
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user