X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/ad06ae2e40db5ce588092d90e1e089f527c27f84..29e4030c485d49ae79d491e7d0297899b9df6f73:/Server/src/controlclient.cpp diff --git a/Server/src/controlclient.cpp b/Server/src/controlclient.cpp index afdd073..6a33e32 100644 --- a/Server/src/controlclient.cpp +++ b/Server/src/controlclient.cpp @@ -46,13 +46,13 @@ ControlClient::~ControlClient(void) { ControlClient::ControlClient(string host, int port): Connection(sockbuf::sock_stream) { #ifdef DEBUG - cerr << __FILE__ << ": host" << host + cerr << __FILE__ << ": host = " << host << " | port = " << port << endl; #endif // DEBUG socket->connect(host.c_str(), port); - if (!socket->is_open()) { - throw ios::failure("Can't connect!"); - } + //if (!socket->is_open()) { + // throw ios::failure("Can't connect!"); + //} } void ControlClient::real_run(void) { @@ -80,8 +80,10 @@ void ControlClient::real_run(void) { switch (response.status_code) { case HTTPMessage::OK: ok_received(); + break; default: error_received(); + break; } } }