+/* Creates and returns a jsonrpc_session that is initially connected to
+ * 'jsonrpc'. If the connection is dropped, it will not be reconnected. */
+struct jsonrpc_session *
+jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc)
+{
+ struct jsonrpc_session *s;
+
+ s = xmalloc(sizeof *s);
+ s->reconnect = reconnect_create(time_msec());
+ reconnect_set_name(s->reconnect, jsonrpc_get_name(jsonrpc));
+ reconnect_set_max_tries(s->reconnect, 0);
+ reconnect_connected(s->reconnect, time_msec());
+ s->rpc = jsonrpc;
+ s->stream = NULL;
+ s->seqno = 0;
+
+ return s;
+}
+