Commit 97befba7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 72d67b9e
......@@ -219,11 +219,12 @@ error _WatchLink::_serveRX(context::Context ctx) {
// XXX +ctx?
error _WatchLink::_send(StreamID stream, const string &msg) {
_WatchLink& wlink = *this;
// XXX +errctx ?
xerr::Contextf E("%s: send .%d", v(wlink), stream);
if (msg.find('\n') != string::npos)
panic("msg has \\n");
string pkt = fmt::sprintf("%lu %s\n", stream, v(msg));
return wlink._write(pkt);
return E(wlink._write(pkt));
}
error _twlinkwrite(WatchLink wlink, const string &pkt) {
......@@ -231,7 +232,7 @@ error _twlinkwrite(WatchLink wlink, const string &pkt) {
}
error _WatchLink::_write(const string &pkt) {
_WatchLink& wlink = *this;
// XXX +errctx ?
// no errctx
wlink._txmu.lock();
defer([&]() {
......
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