From: <mik...@us...> - 2003-12-27 11:42:42
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/test In directory sc8-pr-cvs1:/tmp/cvs-serv1468/src/test Modified Files: TestHttpSocket.cpp Log Message: 27/12/2003 Mikael Barbeaux * Fixed a bug about rebinding sockets on the same address. Index: TestHttpSocket.cpp =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/test/TestHttpSocket.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestHttpSocket.cpp 26 Dec 2003 22:56:42 -0000 1.1 +++ TestHttpSocket.cpp 27 Dec 2003 11:42:39 -0000 1.2 @@ -56,15 +56,18 @@ cout << endl << endl; try { cout << "Creates a http server on port 4589..." << endl; - HttpServerSocket server(4589); + HttpServerSocket *server = new HttpServerSocket(4589); cout << "Starts the server for 30 seconds..." << endl; - server.start(); + server->start(); for(int i=0;i<20;i++) { cout << "Waited " << i << " seconds..." <<endl; Thread::sleep(1); } - cout << "Closing server..." << endl; - server.stop(); + if(server->isRunning()) { + cout << "Closing server..." << endl; + server->stop(); + } + delete server; } catch(Exception& e) { // display the exception message |