Skip to content

Commit

Permalink
move EndMsg to the right place
Browse files Browse the repository at this point in the history
It's somewhat confusing in the finishing block, when it should actually
happen only after all the FileChunkMsg's are sent.
  • Loading branch information
llunak committed Mar 20, 2014
1 parent 8bdc34b commit 555b81f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions daemon/serve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ int handle_connection(const string &basedir, CompileJob *job,
}

if (!bytes) {
if( !client->send_msg(EndMsg())) {
log_info() << "write of obj end failed " << endl;
throw myexception(EXIT_DISTCC_FAILED);
}
break;
}

Expand All @@ -220,10 +224,6 @@ int handle_connection(const string &basedir, CompileJob *job,
throw myexception(rmsg.status);

} catch (myexception e) {
if (client && e.exitcode() == 0) {
client->send_msg(EndMsg());
}

delete client;
client = 0;

Expand Down

0 comments on commit 555b81f

Please sign in to comment.