UltraMonkey-L7 V3(multi-thread implementation)
修订版 | 7929006fbb79c032d662de4e400cecb97374b57e (tree) |
---|---|
时间 | 2012-08-31 15:22:15 |
作者 | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
Merge branch 'ssl_fix_by_CW'
@@ -897,11 +897,20 @@ void tcp_session::up_thread_run() | ||
897 | 897 | |
898 | 898 | if (ssl_flag) { |
899 | 899 | client_ssl_socket.wait_async_event_all_end(); |
900 | + | |
901 | + // clear messages | |
902 | + | |
903 | + tcp_thread_message *msg = up_thread_message_que.pop(); | |
904 | + while (msg) { | |
905 | + delete msg; | |
906 | + msg = up_thread_message_que.pop(); | |
907 | + } | |
908 | + | |
900 | 909 | upthread_status = UPTHREAD_LOCK; |
901 | 910 | parent_dispatcher.post(boost::bind(&tcp_session::up_thread_client_ssl_socket_clear_socket_handler,this)); |
902 | 911 | boost::mutex::scoped_lock lock(upthread_status_mutex); |
903 | 912 | while (unlikely(upthread_status == UPTHREAD_LOCK)) { |
904 | - tcp_thread_message *msg = up_thread_message_que.pop(); | |
913 | + msg = up_thread_message_que.pop(); | |
905 | 914 | if (msg) { // message is alive. |
906 | 915 | msg->message(MESSAGE_PROC); |
907 | 916 | delete msg; |