summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-24 18:56:47 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-24 18:56:47 +0000
commit7beaff764ccdd06f0e6852fc8091ee61189b1a2b (patch)
tree2bb5beb77cb98ff5528496736a221e01487834f9 /src/server.cpp
parent262c1489b10663f817f7c2bb11a61d0c9a8d8439 (diff)
downloadlibbu++-7beaff764ccdd06f0e6852fc8091ee61189b1a2b.tar.gz
libbu++-7beaff764ccdd06f0e6852fc8091ee61189b1a2b.tar.bz2
libbu++-7beaff764ccdd06f0e6852fc8091ee61189b1a2b.tar.xz
libbu++-7beaff764ccdd06f0e6852fc8091ee61189b1a2b.zip
Strange, I never actually made any of the server code clean up behind itself
in the deconstructors. When you deleted a server it wouldn't close it's sockets. We never noticed because servers normally last the entire lifetime of the program they're in.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 981da0c..eb85997 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -21,6 +21,15 @@ Bu::Server::Server() :
21 21
22Bu::Server::~Server() 22Bu::Server::~Server()
23{ 23{
24 for( SrvHash::iterator i = hServers.begin(); i != hServers.end(); i++ )
25 {
26 delete *i;
27 }
28
29 for( ClientHash::iterator i = hClients.begin(); i != hClients.end(); i++ )
30 {
31 delete *i;
32 }
24} 33}
25 34
26void Bu::Server::addPort( int nPort, int nPoolSize ) 35void Bu::Server::addPort( int nPort, int nPoolSize )