1
This commit is contained in:
parent
6001cb8e02
commit
54336693e4
@ -1,8 +1,17 @@
|
|||||||
#include "precompile.h"
|
#include "precompile.h"
|
||||||
|
|
||||||
#include "downstream.h"
|
#include "downstream.h"
|
||||||
|
#include "upstream.h"
|
||||||
|
|
||||||
|
#include "ss_proto.pb.h"
|
||||||
|
|
||||||
void DownStream::ForwardUpStreamMsg(f8::MsgHdr& hdr)
|
void DownStream::ForwardUpStreamMsg(f8::MsgHdr& hdr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DownStream::OnClose()
|
||||||
|
{
|
||||||
|
ss::SS_WSP_SocketDisconnect msg;
|
||||||
|
conn.lock()->SendMsg(socket_handle, msg);
|
||||||
|
}
|
||||||
|
@ -8,6 +8,7 @@ class DownStream
|
|||||||
std::weak_ptr<UpStream> conn;
|
std::weak_ptr<UpStream> conn;
|
||||||
|
|
||||||
void ForwardUpStreamMsg(f8::MsgHdr& hdr);
|
void ForwardUpStreamMsg(f8::MsgHdr& hdr);
|
||||||
|
void OnClose();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int type_ = 0;
|
int type_ = 0;
|
||||||
|
@ -44,8 +44,7 @@ void DownStreamMgr::OnClientDisconnect(int socket_handle)
|
|||||||
auto down_wp = GetDownStream(socket_handle);
|
auto down_wp = GetDownStream(socket_handle);
|
||||||
if (auto down = down_wp.lock(); !down_wp.expired()) {
|
if (auto down = down_wp.lock(); !down_wp.expired()) {
|
||||||
if (!down->conn.expired()) {
|
if (!down->conn.expired()) {
|
||||||
ss::SS_WSP_SocketDisconnect msg;
|
down->OnClose();
|
||||||
down->conn.lock()->SendMsg(socket_handle, msg);
|
|
||||||
}
|
}
|
||||||
socket_hash_.erase(socket_handle);
|
socket_hash_.erase(socket_handle);
|
||||||
}
|
}
|
||||||
@ -123,7 +122,8 @@ void DownStreamMgr::AddPendingAccount(const std::string& account_id, int socket_
|
|||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
pending_account_hash_.erase(socket_handle);
|
pending_account_hash_.erase(socket_handle);
|
||||||
App::Instance()->perf.max_join_time = std::max((long long)1000 * 10, App::Instance()->perf.max_join_time);
|
App::Instance()->perf.max_join_time =
|
||||||
|
std::max((long long)1000 * 10, App::Instance()->perf.max_join_time);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&timer_attacher_
|
&timer_attacher_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user