forked from weaselab/weaseldb
Try to write immediately after reading
This commit is contained in:
1 parent
4de9245ec7
commit
e342229743
1 file changed
+4
-1
+4
-1
@@ -338,7 +338,10 @@ void Server::start_network_threads() {
|
||||
}
|
||||
}
|
||||
|
||||
if (events[i].events & EPOLLOUT) {
|
||||
// Send immediately if we already already have outgoing messages from
|
||||
// read callbacks.
|
||||
if ((events[i].events & EPOLLOUT) ||
|
||||
((events[i].events & EPOLLIN) && conn->hasMessages())) {
|
||||
bool error = conn->writeBytes();
|
||||
if (error) {
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user