Ver Fonte

LibCore: update m_bound on socket bind

Muhammad Zahalqa há 5 anos atrás
pai
commit
eb77568d8c
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      Libraries/LibCore/UDPServer.cpp

+ 2 - 1
Libraries/LibCore/UDPServer.cpp

@@ -68,7 +68,8 @@ bool UDPServer::bind(const IPv4Address& address, u16 port)
 
     rc = ::bind(m_fd, (const sockaddr*)&in, sizeof(in));
     ASSERT(rc == 0);
-
+    m_bound = true;
+    
     m_notifier = Notifier::construct(m_fd, Notifier::Event::Read, this);
     m_notifier->on_ready_to_read = [this] {
         if (on_ready_to_receive)