Send blank line after 10 minutes idle
Without this, I was having catgirl "time out" from pounce's POV, but without catgirl noticing anything... I still don't understand this. Been using this fix for a couple weeks though and it stopped happening, and it's otherwise harmless, but yikes.weechat-hashes
parent
2f53f75892
commit
1d5c4a5e34
7
chat.c
7
chat.c
|
@ -264,7 +264,7 @@ int main(int argc, char *argv[]) {
|
|||
{ .events = POLLIN, .fd = execPipe[0] },
|
||||
};
|
||||
while (!self.quit) {
|
||||
int nfds = poll(fds, (self.restricted ? 2 : ARRAY_LEN(fds)), -1);
|
||||
int nfds = poll(fds, (self.restricted ? 2 : ARRAY_LEN(fds)), 600000);
|
||||
if (nfds < 0 && errno != EINTR) err(EX_IOERR, "poll");
|
||||
if (nfds > 0) {
|
||||
if (fds[0].revents) uiRead();
|
||||
|
@ -273,6 +273,11 @@ int main(int argc, char *argv[]) {
|
|||
if (fds[3].revents) execRead();
|
||||
}
|
||||
|
||||
// XXX: Socket seems to just stop working when connected to something
|
||||
// like pounce which sends no pings and there is no activity for a long
|
||||
// time, so just send something...
|
||||
if (!nfds) ircFormat("\r\n");
|
||||
|
||||
if (signals[SIGHUP]) self.quit = "zzz";
|
||||
if (signals[SIGINT] || signals[SIGTERM]) break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue