|
@@ -68,7 +68,7 @@ bool CSocket::connect(const CSocketAddress& address, int port)
|
|
|
if (rc < 0) {
|
|
|
if (errno == EINPROGRESS) {
|
|
|
dbg() << *this << " connection in progress (EINPROGRESS)";
|
|
|
- m_notifier = make<CNotifier>(fd(), CNotifier::Event::Write);
|
|
|
+ m_notifier = make<CNotifier>(fd(), CNotifier::Event::Write, this);
|
|
|
m_notifier->on_ready_to_write = [this] {
|
|
|
dbg() << *this << " connected!";
|
|
|
m_connected = true;
|
|
@@ -138,7 +138,7 @@ void CSocket::did_update_fd(int fd)
|
|
|
m_read_notifier = nullptr;
|
|
|
return;
|
|
|
}
|
|
|
- m_read_notifier = make<CNotifier>(fd, CNotifier::Event::Read);
|
|
|
+ m_read_notifier = make<CNotifier>(fd, CNotifier::Event::Read, this);
|
|
|
m_read_notifier->on_ready_to_read = [this] {
|
|
|
if (on_ready_to_read)
|
|
|
on_ready_to_read();
|