• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


Commit MetaInfo

修訂6f7e6a6e25fd0d38aa80ac888a56c1ef7af7bc5b (tree)
時間2012-09-08 13:19:30
作者Hiroaki Nakano <nakano.hiroaki@nttc...>
Commiterhibari

Log Message

#29144 でclose messageをpostするまえに、message queueをclearしておく。

Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>

Change Summary

差異

--- a/l7vsd/src/tcp_session.cpp
+++ b/l7vsd/src/tcp_session.cpp
@@ -897,11 +897,20 @@ void tcp_session::up_thread_run()
897897
898898 if (ssl_flag) {
899899 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+
900909 upthread_status = UPTHREAD_LOCK;
901910 parent_dispatcher.post(boost::bind(&tcp_session::up_thread_client_ssl_socket_clear_socket_handler,this));
902911 boost::mutex::scoped_lock lock(upthread_status_mutex);
903912 while (unlikely(upthread_status == UPTHREAD_LOCK)) {
904- tcp_thread_message *msg = up_thread_message_que.pop();
913+ msg = up_thread_message_que.pop();
905914 if (msg) { // message is alive.
906915 msg->message(MESSAGE_PROC);
907916 delete msg;