From c99759a48939881cd996a2966ecb41b3d36ecf0f Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Sun, 30 Sep 2012 17:02:44 -0400 Subject: [PATCH] bug fixes --- src/log.cpp | 1 + src/thread.cpp | 2 ++ src/udp_socket.cpp | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/log.cpp b/src/log.cpp index 110a925..6b03537 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -44,6 +44,7 @@ namespace fc { if (isatty(fileno(stderr))) fprintf( stderr, "%s", CONSOLE_DEFAULT ); fprintf( stderr, "\n" ); + fflush( stderr ); } /** used to add extra fields to be printed (thread,fiber,time,etc) */ diff --git a/src/thread.cpp b/src/thread.cpp index fba03bd..239a925 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -56,6 +56,7 @@ namespace fc { thread::~thread() { if( is_current() ) { + //slog( "my %p", my ); delete my; my = 0; } @@ -299,6 +300,7 @@ namespace fc { } void thread::notify( const promise_base::ptr& p ) { + //slog( "this %p my %p", this, my ); BOOST_ASSERT(p->ready()); if( !is_current() ) { this->async( [=](){ notify(p); }, "notify", priority::max() ); diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index 4ed2bc1..530590d 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -10,7 +10,7 @@ namespace fc { public: impl():_sock( fc::asio::default_io_service() ){} ~impl(){ - _sock.cancel(); + // _sock.cancel(); } boost::asio::ip::udp::socket _sock; @@ -77,7 +77,7 @@ namespace fc { } } void udp_socket::close() { - my->_sock.cancel(); + //my->_sock.cancel(); my->_sock.close(); }