diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-03-21 21:40:11 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-03-22 15:02:46 +0800 |
| commit | bc77c515c7c22159fcbaf0fe6fda5e653b946fa0 (patch) | |
| tree | 7ee28b6da52d19546b4adc0d3aac68d4cd371891 /src | |
| parent | 747e66ce6b590642c1fe430e1df29c9c3a056e2e (diff) | |
fix: broken pipe sometimes
Diffstat (limited to 'src')
| -rw-r--r-- | src/session.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp index 26dc3f8..5edfa56 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -177,7 +177,7 @@ bool CSession::write(std::format_string<Args...> fmt, Args &&...args) { if (m_isReading) msg.insert(0, "\n"); - if (send(m_sockfd.get(), msg.c_str(), msg.size(), 0) < 0) { + if (send(m_sockfd.get(), msg.c_str(), msg.size(), MSG_NOSIGNAL) < 0) { onErrno(WRITE); return false; } |
