Skip to content

Commit

Permalink
修复windows网络关闭异常
Browse files Browse the repository at this point in the history
  • Loading branch information
DSKY\toney.yin committed Jan 13, 2024
1 parent 173f5f2 commit 5ba82bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/luabus/src/socket_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bool socket_stream::update(int64_t now,bool check_timeout) {
switch (m_link_status) {
case elink_status::link_closed: {
#ifdef _MSC_VER
if (m_ovl_ref != 0) return true;
if (m_ovl_ref > 0) return true;
#endif
if (m_socket != INVALID_SOCKET) {
m_mgr->unwatch(m_socket);
Expand All @@ -100,6 +100,9 @@ bool socket_stream::update(int64_t now,bool check_timeout) {
return false;
}
case elink_status::link_colsing: {
#ifdef _MSC_VER
if (m_ovl_ref > 1) return true;
#endif
if (m_send_buffer.empty()) {
m_link_status = elink_status::link_closed;
}
Expand Down

0 comments on commit 5ba82bb

Please sign in to comment.