Commit d80dc316 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0b9cfeb2
......@@ -181,7 +181,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
// wcfs sent reply on unexpected stream -> shutdown wlink.
// XXX down.
log::Errorf("%s: .%lu: wcfs sent reply on unexpected stream", v(wlink), pkt.stream);
return XXX;
return ErrLinkDown; // XXX correct error
}
int _ = select({
ctx->done().recvs(), // 0
......@@ -197,9 +197,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.lock();
if (wlink._accepted.has(pkt.stream)) {
wlink._rxmu.unlock();
// XXX log + down
printf("%s: .%lu: wcfs sent request on already used stream", v(wlink), pkt.stream);
continue; // XXX -> return
// wcfs request on already used stream
log::Errorf("%s: .%lu: wcfs sent request on already used stream", v(wlink), pkt.stream);
return ErrLinkDown; // XXX correct error
}
// XXX clear _accepted not to leak memory after reply is sent
wlink._accepted.insert(pkt.stream);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment