hoist vector out of loop just in case

This commit is contained in:
Will Dietz 2018-03-01 18:58:41 -06:00
parent c89a3d5368
commit 6b9a03f5d8

View file

@ -4154,9 +4154,9 @@ void Worker::waitForInput()
assert(goal);
set<int> fds2(j->fds);
std::vector<unsigned char> buffer(4096);
for (auto & k : fds2) {
if (FD_ISSET(k, &fds)) {
std::vector<unsigned char> buffer(4096);
ssize_t rd = read(k, buffer.data(), buffer.size());
if (rd == -1) {
if (errno != EINTR)