stream: By default disable probing on unix sockets.
[openvswitch] / ovsdb / jsonrpc-server.c
index 1848bb989363994f5dc1786acf473212ab985703..88656b9656f0f62a8a6a59101275755235d5f36a 100644 (file)
@@ -127,11 +127,13 @@ ovsdb_jsonrpc_server_destroy(struct ovsdb_jsonrpc_server *svr)
 }
 
 struct ovsdb_jsonrpc_options *
-ovsdb_jsonrpc_default_options(void)
+ovsdb_jsonrpc_default_options(const char *target)
 {
     struct ovsdb_jsonrpc_options *options = xzalloc(sizeof *options);
-    options->probe_interval = RECONNECT_DEFAULT_PROBE_INTERVAL;
     options->max_backoff = RECONNECT_DEFAULT_MAX_BACKOFF;
+    options->probe_interval = (stream_or_pstream_needs_probes(target)
+                               ? RECONNECT_DEFAULT_PROBE_INTERVAL
+                               : 0);
     return options;
 }