From 36b12593e6ec34a88bde537a220e7a15f478638c Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Nov 2011 15:04:37 -0800 Subject: Balancing code a bit out of the constructor. --- src/Socket.cc | 4 ++-- 1 file 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 io; try { -- cgit v1.2.3