- imp->imp_next_ping = cfs_time_shift(
- (imp->imp_state == LUSTRE_IMP_DISCON ?
- RECONNECT_INTERVAL : PING_INTERVAL));
+#ifdef ENABLE_PINGER
+ int time = (imp->imp_state != LUSTRE_IMP_DISCON) ? PING_INTERVAL :
+ /* FIXME should this be limited to LND_TIMEOUT so we don't
+ build up pings in LND output queues? */
+ max_t(int, CONNECTION_SWITCH_MIN,
+ at_get(&imp->imp_at.iat_net_latency));
+ imp->imp_next_ping = cfs_time_shift(time);
+#endif /* ENABLE_PINGER */