Skip to content

Commit

Permalink
增加wepoll 不支持边缘触发判断
Browse files Browse the repository at this point in the history
  • Loading branch information
PioLing committed Nov 10, 2023
1 parent 97871cf commit aa60cbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Network/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,9 @@ int Socket::onAccept(const SockNum::Ptr &sock, int event) noexcept {
// emitErr(ex); https://github.com/ZLMediaKit/ZLMediaKit/issues/2946
ErrorL << "Accept socket failed: " << ex.what();
// 可能打开的文件描述符太多了:UV_EMFILE/UV_ENFILE
#if defined(HAS_EPOLL)
// 边缘触发,还需要手动再触发accept事件
#if defined(HAS_EPOLL) && !defined(_WIN32)
// 边缘触发,还需要手动再触发accept事件,
//wepoll, Edge-triggered (`EPOLLET`) mode isn't supported.
std::weak_ptr<Socket> weak_self = shared_from_this();
_poller->doDelayTask(100, [weak_self, sock]() {
if (auto strong_self = weak_self.lock()) {
Expand Down

0 comments on commit aa60cbc

Please sign in to comment.