buffer: Fail early and print diagnostic message

When /tmp/mist/ was created before as a different user, and MistBuffer was
started, it would print "End of input file - buffer shutting down". This is very
confusing, therefore fail earlier and print a more useful message even if DEBUG
is disabled.
This commit is contained in:
Lekensteyn 2012-06-03 12:17:41 +02:00
parent fcf29984c0
commit ae057d3e78

View file

@ -188,6 +188,10 @@ namespace Buffer{
std::string name = argv[1];
SS = Socket::makeStream(name);
if (!SS.connected()) {
perror("Could not create stream socket");
return 1;
}
thisStream = Stream::get();
thisStream->setName(name);
Socket::Connection incoming;