X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fserver.cpp;h=259d13b087598d5ae602f1c4b16e7ec6ed24259e;hb=c8df43e7794dc82d5604dfa612e464bbc5ca3cdd;hp=2fcfb90055933e036bbc7c71d3216a41020bddf7;hpb=96abc895c4484ce437cde9f198ba699210d80070;p=libs%2Fnet.git diff --git a/source/server.cpp b/source/server.cpp index 2fcfb90..259d13b 100644 --- a/source/server.cpp +++ b/source/server.cpp @@ -55,7 +55,6 @@ void Server::submit_response(Response &resp) if(cl.async) { cl.sock->write(resp.str()); - cl.sock->close(); cl.stale = true; } } @@ -146,7 +145,6 @@ void Server::client_data_available(Client &cl) if(response) { cl.sock->write(response->str()); - cl.sock->close(); cl.stale = true; } } @@ -162,7 +160,8 @@ Server::Client &Server::get_client_by_response(Response &resp) if(i->response==&resp) return *i; - throw InvalidParameterValue("Response does not belong to any client"); + // XXX Do this differently + throw invalid_argument("Response does not belong to any client"); }