@@ -75,14 +75,14 @@ namespace {
7575class Log {
7676public:
7777 Log () {}
78-
78+
7979 ~Log () {
8080 mLogFile << " \n ]\n }\n " ;
8181 mLogFile .flush ();
8282 }
8383
8484 inline void init (llvm::StringRef App, llvm::StringRef Date,
85- llvm::StringRef Version, std::fstream &&LogFile) {
85+ llvm::StringRef Version, std::fstream &&LogFile) {
8686 mLogFile = std::move (LogFile);
8787 mLogFile << " {\n " << R"( "Application": )" << ' "' << App.data () << ' "' ;
8888 mLogFile << " ,\n " << R"( "Date": )" << ' "' << Date.data () << ' "' ;
@@ -146,7 +146,7 @@ int main(int Argc, char **Argv) {
146146 Status[net::Socket::ServerPort] = 0 ;
147147 Status[net::Socket::ClientPort] = 0 ;
148148 L.init (Argv[0 ], Status[net::Socket::Date], Status[net::Socket::TSARVersion],
149- std::move (LogFile));
149+ std::move (LogFile));
150150 L.print (Status, " ,\n \" Status\" : [\n " );
151151 bcl::net::startServer (" localhost" , 0 , 0 ,
152152 [](bcl::net::SocketStatus StatusID, const bcl::net::Connection &Connection){
@@ -182,6 +182,10 @@ int main(int Argc, char **Argv) {
182182 Status[net::Socket::Status] = " close" ;
183183 Status[net::Socket::Message] = " socket is closed" ;
184184 break ;
185+ case bcl::net::SocketStatus::InitializeError:
186+ Status[net::Socket::Status] = " error" ;
187+ Status[net::Socket::Message] = " unable to initialize socket library" ;
188+ break ;
185189 case bcl::net::SocketStatus::CreateError:
186190 Status[net::Socket::Status] = " error" ;
187191 Status[net::Socket::Message] = " unable to create socket" ;
0 commit comments