+ s->pstream = NULL;
+ s->seqno = 0;
+ s->dscp = 0;
+ s->last_error = 0;
+
+ if (!pstream_verify_name(name)) {
+ reconnect_set_passive(s->reconnect, true, time_msec());
+ } else if (!retry) {
+ reconnect_set_max_tries(s->reconnect, 1);
+ reconnect_set_backoff(s->reconnect, INT_MAX, INT_MAX);
+ }
+
+ if (!stream_or_pstream_needs_probes(name)) {
+ reconnect_set_probe_interval(s->reconnect, 0);
+ }
+
+ return s;
+}
+
+/* Creates and returns a jsonrpc_session that is initially connected to
+ * 'jsonrpc'. If the connection is dropped, it will not be reconnected.
+ *
+ * On the assumption that such connections are likely to be short-lived
+ * (e.g. from ovs-vsctl), informational logging for them is suppressed. */
+struct jsonrpc_session *
+jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc, uint8_t dscp)
+{
+ struct jsonrpc_session *s;
+
+ s = xmalloc(sizeof *s);
+ s->reconnect = reconnect_create(time_msec());
+ reconnect_set_quiet(s->reconnect, true);
+ reconnect_set_name(s->reconnect, jsonrpc_get_name(jsonrpc));
+ reconnect_set_max_tries(s->reconnect, 0);
+ reconnect_connected(s->reconnect, time_msec());
+ s->dscp = dscp;
+ s->rpc = jsonrpc;
+ s->stream = NULL;
+ s->pstream = NULL;