state_transition(rc, S_ACTIVE);
}
+/* If 'rc' is connected, forces it to drop the connection and reconnect. */
+void
+rconn_reconnect(struct rconn *rc)
+{
+ if (rc->state & (S_ACTIVE | S_IDLE)) {
+ disconnect(rc, 0);
+ }
+}
+
void
rconn_disconnect(struct rconn *rc)
{
int rconn_connect(struct rconn *, const char *name);
void rconn_connect_unreliably(struct rconn *,
const char *name, struct vconn *vconn);
+void rconn_reconnect(struct rconn *);
void rconn_disconnect(struct rconn *);
void rconn_destroy(struct rconn *);