Fixed writing issue during write to another socket.

This commit is contained in:
Brad Arant committed 2022-10-25 20:33:50 -07:00
1 parent db199eaec3
commit 0dc5d5738e
36 files changed
+91 -81

No files matched your search

+2 -2
View File
@@ -134,12 +134,12 @@ namespace core {
}
}
int Socket::write(std::string data) {
int Socket::write(std::string data, Socket *sender) {
outlock.lock();
fifo.emplace(data);
outlock.unlock();
// coreutils::Log(coreutils::LOG_DEBUG_4) << "inHandler " << descriptor << " " << inHandler << ":" << shutDown << ":[" << data << "]";
if(!inHandler)
if(!inHandler && sender != this)
ePoll.resetSocket(this);
return 1;
}