mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
parent
2dc385e31b
commit
caf3380e73
@ -76,9 +76,16 @@ bool Stream::WaitForData(int timeout)
|
|||||||
return IsDataAvailable() || IsEof();
|
return IsDataAvailable() || IsEof();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void StreamDummyCallback(void)
|
||||||
|
{ }
|
||||||
|
|
||||||
void Stream::Close(void)
|
void Stream::Close(void)
|
||||||
{
|
{
|
||||||
OnDataAvailable.disconnect_all_slots();
|
OnDataAvailable.disconnect_all_slots();
|
||||||
|
|
||||||
|
/* Force signals2 to remove the slots, see https://stackoverflow.com/questions/2049291/force-deletion-of-slot-in-boostsignals2
|
||||||
|
* for details. */
|
||||||
|
OnDataAvailable.connect(boost::bind(&StreamDummyCallback));
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamReadStatus Stream::ReadLine(String *line, StreamReadContext& context, bool may_wait)
|
StreamReadStatus Stream::ReadLine(String *line, StreamReadContext& context, bool may_wait)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user