Merge branch 'master' into paz-927
[pazpar2-moved-to-github.git] / src / client.c
index dd4405f..e5a2e5d 100644 (file)
@@ -1151,7 +1151,9 @@ void client_set_connection(struct client *cl, struct connection *con)
     }
     else
     {
+        client_lock(cl);
         cl->connection = con;
+        client_unlock(cl);
         client_destroy(cl);
     }
 }