3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 11:59:40 +01:00
ergo/irc
Shivaram Lingamneni ad1e00629b fix a race condition in idle timeouts
squigz on freenode reported an issue where bots were responding to PING
on time, but were occasionally being timed out regardless. This was a race
condition: timeout was detected as idleTime >= it.quitTimeout, but if
the client responded promptly to its PING message and sent no further messages,
but the main loop subsequently slept for longer than expected (i.e., significantly
longer than quitTimeout), this condition would be met through no fault of the
client's.

The fix here is to explicitly track the last time the ping was sent, then test
!lastSeen.After(lastPinged) instead (making use of time.Time's monotonicity).
It is sufficient that the measurement of lastPinged happens-before the PING is sent.
2017-12-02 20:30:26 -05:00
..
caps draft/sts -> sts 2017-10-15 07:58:18 +10:00
connection_limits review fix: rename various packages and objects 2017-10-09 17:38:06 -04:00
custime dline/kline: Allow year/month/day durations 2017-03-07 19:56:21 +10:00
isupport Add tests to subpackages 2017-10-07 22:19:37 +10:00
logger logger: Fix comments 2017-10-06 12:44:11 +10:00
passwd Allow WEBIRC from specified hosts 2017-10-15 16:18:14 +10:00
sno Add license stuff to the top of caps/ and sno/ files I guess 2017-09-29 17:33:29 +10:00
utils Split utils out to a separate subpackage 2017-10-05 23:47:43 +10:00
accountreg.go Split passwd into its' own subpackage 2017-10-06 00:03:53 +10:00
accounts.go Move caps to their own package to prevent conflicts 2017-09-29 12:07:52 +10:00
capability.go caps: Move most capability-handling types into the caps package 2017-09-29 17:25:58 +10:00
channel.go refactor ClientManager 2017-11-22 05:09:38 -05:00
channelmanager.go fix a wide-ranging assortment of crash bugs 2017-11-13 02:42:20 -05:00
channelreg.go remove registeredChannelsMutex 2017-11-08 22:24:33 -05:00
chanserv.go remove registeredChannelsMutex 2017-11-08 22:24:33 -05:00
client_lookup_set.go review fixes 2017-11-22 16:35:57 -05:00
client.go synchronize accesses to client.atime 2017-12-02 20:05:06 -05:00
commands.go WHO: Require first param, matching other servers 2017-11-19 10:10:10 +10:00
config.go make error recovery configurable 2017-10-26 04:19:01 -04:00
constants.go Setup v0.10.3-unreleased devel ver 2017-11-13 22:52:48 +10:00
database.go Split passwd into its' own subpackage 2017-10-06 00:03:53 +10:00
debug.go Change debug files from ergonomadic -> oragono 2017-10-15 12:48:10 +10:00
dline.go refactor ClientManager 2017-11-22 05:09:38 -05:00
gateways.go add two getters 2017-10-15 19:46:25 -04:00
getters.go remove registeredChannelsMutex 2017-11-08 22:24:33 -05:00
help.go Add the INFO command 2017-10-29 07:59:56 +00:00
idletimer.go fix a race condition in idle timeouts 2017-12-02 20:30:26 -05:00
kline.go refactor ClientManager 2017-11-22 05:09:38 -05:00
message_tags.go Rename deps 2017-06-15 10:14:19 -06:00
modes_test.go add a test for default channel mode parsing 2017-09-06 19:51:50 -04:00
modes.go allow unprivileged users to list bans 2017-11-13 18:25:51 -05:00
monitor.go refactor ClientManager 2017-11-22 05:09:38 -05:00
nickname.go fix a bug where the uncasefolded nickname wasn't being recorded 2017-11-22 16:56:14 -05:00
nickserv.go Rename deps 2017-06-15 10:14:19 -06:00
numerics.go client: Show real IP and whether the target's using TLS in WHOIS 2017-06-23 05:15:10 +10:00
roleplay.go refactor synchronization for Channel 2017-10-22 19:50:16 -04:00
server.go refactor ClientManager 2017-11-22 05:09:38 -05:00
snomanager.go refactor ClientManager 2017-11-22 05:09:38 -05:00
socket.go irc: fix timer memleak 2017-07-14 17:21:53 +10:00
strings_test.go strings: Follow latest advice on PRECIS regarding string stabilizing 2017-09-06 14:38:55 +10:00
strings.go strings: Follow latest advice on PRECIS regarding string stabilizing 2017-09-06 14:38:55 +10:00
types.go remove channelJoinPartMutex 2017-10-30 05:21:47 -04:00
whowas.go refactor ClientManager 2017-11-22 05:09:38 -05:00