diff options
author | John Langford <jl@humpty.(none)> | 2010-10-19 17:45:22 +0400 |
---|---|---|
committer | John Langford <jl@humpty.(none)> | 2010-10-19 17:45:22 +0400 |
commit | e848e93280604f57b061b34ad691c00d3a79f2bd (patch) | |
tree | 7093812701356e5f8c248734c28252a7be42d491 /multisource.cc | |
parent | 5627c8156e0a77e5d6abbeb26c9baa64675b415b (diff) |
fixed reset/daemon interaction bug
Diffstat (limited to 'multisource.cc')
-rw-r--r-- | multisource.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/multisource.cc b/multisource.cc index d444f80b..7975352b 100644 --- a/multisource.cc +++ b/multisource.cc @@ -18,7 +18,7 @@ int really_read(int sock, void* in, size_t count) else if (r < 0) { - cerr << "argh! bad read! " << endl; + cerr << "argh! bad read! on message from " << sock << endl; perror(NULL); exit(0); } @@ -55,11 +55,13 @@ void send_prediction(int sock, prediction &p) } } +int send_counter = 0; void send_global_prediction(int sock, global_prediction p) { + send_counter++; if (write(sock, &p, sizeof(p)) < (int)sizeof(p)) { - cerr << "argh! bad global write! " << sock << endl; + cerr << "argh! bad global write! " << sock << " on message " << send_counter << endl; perror(NULL); exit(0); } |