Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_pubsub_bug #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/ConnectConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@
#include "Request.h"
#include "ResponseParser.h"

enum ConnectConnectionListIndex
{
PostConn = 0,
PrivateConn,

ConnListSize
};

class ConnectConnection :
public ConnectSocket,
public Connection,
public ListNode<ConnectConnection>,
public ListNode<ConnectConnection, ConnectConnection*, ConnectConnectionListIndex::ConnListSize>,
public DequeNode<ConnectConnection>
{
public:
typedef ConnectConnection Value;
typedef ListNode<ConnectConnection> ListNodeType;
typedef ListNode<ConnectConnection, ConnectConnection*, ConnectConnectionListIndex::ConnListSize> ListNodeType;
typedef DequeNode<ConnectConnection> DequeNodeType;
typedef Alloc<ConnectConnection, Const::ConnectConnectionAllocCacheSize> Allocator;
public:
Expand Down Expand Up @@ -96,7 +104,8 @@ class ConnectConnection :
bool mReadonly;
};

typedef List<ConnectConnection> ConnectConnectionList;
typedef List<ConnectConnection, ConnectConnectionListIndex::PostConn> PostConnectConnectionList;
typedef List<ConnectConnection, ConnectConnectionListIndex::PrivateConn> PrivateConnectConnectionList;
typedef Deque<ConnectConnection> ConnectConnectionDeque;
typedef ConnectConnection::Allocator ConnectConnectionAlloc;

Expand Down
2 changes: 1 addition & 1 deletion src/ConnectConnectionPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ConnectConnectionPool
Server* mServ;
int mPendRequests;
std::vector<ConnectConnection*> mShareConns;
std::vector<ConnectConnectionList> mPrivateConns;
std::vector<PrivateConnectConnectionList> mPrivateConns;
ServerStats mStats;
std::vector<LatencyMonitor> mLatencyMonitors;
};
Expand Down
2 changes: 1 addition & 1 deletion src/Handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Handler : public ID<Handler>
std::vector<ConnectConnectionPool*> mConnPool;
AcceptConnectionDeque mAcceptConns;
AcceptConnectionList mPostAcceptConns;
ConnectConnectionList mPostConnectConns;
PostConnectConnectionList mPostConnectConns;
ConnectConnectionDeque mWaitConnectConns;
long mStatsVer;
HandlerStats mStats;
Expand Down