bug fixes

This commit is contained in:
Daniel Larimer 2012-09-30 17:02:44 -04:00
parent 7c4b94f6e4
commit c99759a489
3 changed files with 5 additions and 2 deletions

View file

@ -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) */

View file

@ -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() );

View file

@ -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();
}