mirror of https://github.com/Icinga/icinga2.git
Replace std::shared_ptr<AsioTcpStream> with Shared<AsioTcpStream>::Ptr
This commit is contained in:
parent
a1683568a1
commit
26ce2cfb73
|
@ -86,7 +86,7 @@ private:
|
|||
};
|
||||
|
||||
typedef boost::asio::buffered_stream<boost::asio::ip::tcp::socket> AsioTcpStream;
|
||||
typedef std::pair<Shared<AsioTlsStream>::Ptr, std::shared_ptr<AsioTcpStream>> OptionalTlsStream;
|
||||
typedef std::pair<Shared<AsioTlsStream>::Ptr, Shared<AsioTcpStream>::Ptr> OptionalTlsStream;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -601,7 +601,7 @@ OptionalTlsStream ElasticsearchWriter::Connect()
|
|||
stream.first = Shared<AsioTlsStream>::Make(IoEngine::Get().GetIoContext(), *sslContext, GetHost());
|
||||
|
||||
} else {
|
||||
stream.second = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext());
|
||||
stream.second = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -176,7 +176,7 @@ void GelfWriter::ReconnectInternal()
|
|||
m_Stream.first = Shared<AsioTlsStream>::Make(IoEngine::Get().GetIoContext(), *sslContext, GetHost());
|
||||
|
||||
} else {
|
||||
m_Stream.second = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext());
|
||||
m_Stream.second = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -187,7 +187,7 @@ void GraphiteWriter::ReconnectInternal()
|
|||
Log(LogNotice, "GraphiteWriter")
|
||||
<< "Reconnecting to Graphite on host '" << GetHost() << "' port '" << GetPort() << "'.";
|
||||
|
||||
m_Stream = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext());
|
||||
m_Stream = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
|
||||
|
||||
try {
|
||||
icinga::Connect(m_Stream->lowest_layer(), GetHost(), GetPort());
|
||||
|
|
|
@ -37,7 +37,7 @@ protected:
|
|||
void Pause() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<AsioTcpStream> m_Stream;
|
||||
Shared<AsioTcpStream>::Ptr m_Stream;
|
||||
boost::mutex m_StreamMutex;
|
||||
WorkQueue m_WorkQueue{10000000, 1};
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ OptionalTlsStream InfluxdbWriter::Connect()
|
|||
stream.first = Shared<AsioTlsStream>::Make(IoEngine::Get().GetIoContext(), *sslContext, GetHost());
|
||||
|
||||
} else {
|
||||
stream.second = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext());
|
||||
stream.second = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -120,8 +120,7 @@ void OpenTsdbWriter::ReconnectTimerHandler()
|
|||
* We're using telnet as input method. Future PRs may change this into using the HTTP API.
|
||||
* http://opentsdb.net/docs/build/html/user_guide/writing/index.html#telnet
|
||||
*/
|
||||
|
||||
m_Stream = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext());
|
||||
m_Stream = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
|
||||
|
||||
try {
|
||||
icinga::Connect(m_Stream->lowest_layer(), GetHost(), GetPort());
|
||||
|
|
|
@ -32,7 +32,7 @@ protected:
|
|||
void Pause() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<AsioTcpStream> m_Stream;
|
||||
Shared<AsioTcpStream>::Ptr m_Stream;
|
||||
|
||||
Timer::Ptr m_ReconnectTimer;
|
||||
|
||||
|
|
Loading…
Reference in New Issue