mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
9a0107d360
commit
8af6ad74c3
@ -76,9 +76,16 @@ bool Stream::WaitForData(int timeout)
|
||||
return IsDataAvailable() || IsEof();
|
||||
}
|
||||
|
||||
static void StreamDummyCallback(void)
|
||||
{ }
|
||||
|
||||
void Stream::Close(void)
|
||||
{
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user