UltraMonkey-L7 V3(multi-thread implementation)
修订版 | 7abe0b21c046c411c01533045b255aae2b83684a (tree) |
---|---|
时间 | 2012-08-30 16:58:48 |
作者 | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
Merge branch 'ssl_fix_by_CW'
@@ -901,14 +901,15 @@ void tcp_session::up_thread_run() | ||
901 | 901 | parent_dispatcher.post(boost::bind(&tcp_session::up_thread_client_ssl_socket_clear_socket_handler,this)); |
902 | 902 | boost::mutex::scoped_lock lock(upthread_status_mutex); |
903 | 903 | while (unlikely(upthread_status == UPTHREAD_LOCK)) { |
904 | - to_time(LOCKTIMEOUT, xt); | |
905 | - upthread_status_cond.timed_wait(lock, xt); | |
906 | 904 | tcp_thread_message *msg = up_thread_message_que.pop(); |
907 | 905 | if (msg) { // message is alive. |
908 | 906 | msg->message(MESSAGE_PROC); |
909 | 907 | delete msg; |
910 | 908 | msg = NULL; |
911 | - } | |
909 | + }else{ | |
910 | + to_time(LOCKTIMEOUT, xt); | |
911 | + upthread_status_cond.timed_wait(lock, xt); | |
912 | + } | |
912 | 913 | } // lockmode while loop end. |
913 | 914 | } |
914 | 915 |