Otherwise we get a crash once the connect_cb callback is invoked the second time.
int nfs_mount(struct nfs_context *nfs, const char *server, const char *export)
{
struct sync_cb_data cb_data;
int nfs_mount(struct nfs_context *nfs, const char *server, const char *export)
{
struct sync_cb_data cb_data;
+ struct rpc_context *rpc = nfs_get_rpc_context(nfs);
wait_for_nfs_reply(nfs, &cb_data);
wait_for_nfs_reply(nfs, &cb_data);
+ /* Dont want any more callbacks even if the socket is closed */
+ rpc->connect_cb = NULL;
+