diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 80c0d5060..7099eb9ee 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -619,6 +619,10 @@ static void processConnection() to.flush(); unsigned int clientVersion = readInt(from); + bool reserveSpace = true; + if (GET_PROTOCOL_MINOR(clientVersion) >= 11) + reserveSpace = readInt(from) != 0; + /* Send startup error messages to the client. */ startWork(); @@ -634,10 +638,6 @@ static void processConnection() throw Error("if you run `nix-worker' as root, then you MUST set `build-users-group'!"); #endif - bool reserveSpace = true; - if (GET_PROTOCOL_MINOR(clientVersion) >= 11) - reserveSpace = readInt(from) != 0; - /* Open the store. */ store = boost::shared_ptr(new LocalStore(reserveSpace));