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:
parent
fcf29984c0
commit
ae057d3e78
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue