bug fixes
This commit is contained in:
parent
7c4b94f6e4
commit
c99759a489
3 changed files with 5 additions and 2 deletions
|
|
@ -44,6 +44,7 @@ namespace fc {
|
||||||
if (isatty(fileno(stderr)))
|
if (isatty(fileno(stderr)))
|
||||||
fprintf( stderr, "%s", CONSOLE_DEFAULT );
|
fprintf( stderr, "%s", CONSOLE_DEFAULT );
|
||||||
fprintf( stderr, "\n" );
|
fprintf( stderr, "\n" );
|
||||||
|
fflush( stderr );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** used to add extra fields to be printed (thread,fiber,time,etc) */
|
/** used to add extra fields to be printed (thread,fiber,time,etc) */
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ namespace fc {
|
||||||
|
|
||||||
thread::~thread() {
|
thread::~thread() {
|
||||||
if( is_current() ) {
|
if( is_current() ) {
|
||||||
|
//slog( "my %p", my );
|
||||||
delete my;
|
delete my;
|
||||||
my = 0;
|
my = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -299,6 +300,7 @@ namespace fc {
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread::notify( const promise_base::ptr& p ) {
|
void thread::notify( const promise_base::ptr& p ) {
|
||||||
|
//slog( "this %p my %p", this, my );
|
||||||
BOOST_ASSERT(p->ready());
|
BOOST_ASSERT(p->ready());
|
||||||
if( !is_current() ) {
|
if( !is_current() ) {
|
||||||
this->async( [=](){ notify(p); }, "notify", priority::max() );
|
this->async( [=](){ notify(p); }, "notify", priority::max() );
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ namespace fc {
|
||||||
public:
|
public:
|
||||||
impl():_sock( fc::asio::default_io_service() ){}
|
impl():_sock( fc::asio::default_io_service() ){}
|
||||||
~impl(){
|
~impl(){
|
||||||
_sock.cancel();
|
// _sock.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::asio::ip::udp::socket _sock;
|
boost::asio::ip::udp::socket _sock;
|
||||||
|
|
@ -77,7 +77,7 @@ namespace fc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void udp_socket::close() {
|
void udp_socket::close() {
|
||||||
my->_sock.cancel();
|
//my->_sock.cancel();
|
||||||
my->_sock.close();
|
my->_sock.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue