Browse Source

re-enable packet pool

pull/1058/head
Jeff Becker 7 years ago
parent
commit
06020b8f54
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
  1. 6
      libi2pd/Streaming.h

6
libi2pd/Streaming.h

@ -276,8 +276,8 @@ namespace stream
/** set max connections per minute per destination */ /** set max connections per minute per destination */
void SetMaxConnsPerMinute(const uint32_t conns); void SetMaxConnsPerMinute(const uint32_t conns);
Packet * NewPacket () { return new Packet; } Packet * NewPacket () { return m_PacketsPool.Acquire(); }
void DeletePacket (Packet * p) { delete p; } void DeletePacket (Packet * p) { return m_PacketsPool.Release(p); }
void AcceptOnceAcceptor (std::shared_ptr<Stream> stream, Acceptor acceptor, Acceptor prev); void AcceptOnceAcceptor (std::shared_ptr<Stream> stream, Acceptor acceptor, Acceptor prev);
@ -315,7 +315,7 @@ namespace stream
std::vector<i2p::data::IdentHash> m_Banned; std::vector<i2p::data::IdentHash> m_Banned;
uint64_t m_LastBanClear; uint64_t m_LastBanClear;
//i2p::util::MemoryPool<Packet> m_PacketsPool; i2p::util::MemoryPool<Packet> m_PacketsPool;
bool m_EnableDrop; bool m_EnableDrop;
public: public:

Loading…
Cancel
Save