summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-15 15:04:37 -0800
committerPixel <pixel@nobis-crew.org>2011-11-15 15:04:37 -0800
commit36b12593e6ec34a88bde537a220e7a15f478638c (patch)
tree4454937c6708fc6567290614e325c7295c0794bf
parentb357aed488d7d2781c2c5f7fecde83f27b973af0 (diff)
Balancing code a bit out of the constructor.
-rw-r--r--src/Socket.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Socket.cc b/src/Socket.cc
index a65bb76..052f6a8 100644
--- a/src/Socket.cc
+++ b/src/Socket.cc
@@ -570,8 +570,6 @@ ssize_t Balau::Socket::write(const void * buf, size_t count) throw (GeneralExcep
Balau::ListenerBase::ListenerBase(int port, const char * local, void * opaque) : m_listener(new Socket()), m_stop(false), m_local(local), m_port(port), m_opaque(opaque) {
m_name = String("Listener for something - Starting on ") + local + ":" + port;
- waitFor(&m_evt);
- setOkayToEAgain(true);
Printer::elog(E_SOCKET, "Created a listener task at %p (%s)", this, m_name.to_charp());
}
@@ -591,6 +589,8 @@ void Balau::ListenerBase::Do() {
r = m_listener->listen();
Assert(r);
setName();
+ setOkayToEAgain(true);
+ waitFor(&m_evt);
while (!m_stop) {
IO<Socket> io;
try {