瀏覽代碼

Kernel: Don't VERIFY_NOT_REACHED in LocalSocket::has_attached_peer()

Invoking sendmsg on a listening socket triggers this assertion as
sendto calls has_attached_peer before checking the result of
send_buffer_for.
Owen Smith 3 年之前
父節點
當前提交
22ec21bd61
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Kernel/Net/LocalSocket.cpp

+ 1 - 1
Kernel/Net/LocalSocket.cpp

@@ -297,7 +297,7 @@ bool LocalSocket::has_attached_peer(const FileDescription& description) const
         return m_connect_side_fd != nullptr;
         return m_connect_side_fd != nullptr;
     if (role == Role::Connected)
     if (role == Role::Connected)
         return m_accept_side_fd_open;
         return m_accept_side_fd_open;
-    VERIFY_NOT_REACHED();
+    return false;
 }
 }
 
 
 bool LocalSocket::can_write(const FileDescription& description, size_t) const
 bool LocalSocket::can_write(const FileDescription& description, size_t) const