3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 11:59:40 +01:00
ergo/irc
Shivaram Lingamneni 60b861e07e fix a race in regenerateMembersCache
The rationale for why regenerateMembersCache didn't need to hold the Lock()
throughout was subtly wrong. It is true that at least some attempt to
regenerate the cache would see *all* the updates. However, it was possible for
the value of `result` generated by that attempt to lose the race for the final
assignment `channel.membersCache = result`.

The fix is to serialize the attempts to regenerate the cache, without adding
any additional locking on the underlying `Channel` fields via
`Channel.stateMutex`. This ensures that the final read from `Channel.members`
is paired with the final write to `Channel.membersCache`.
2017-11-07 14:38:18 -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 fix a race in regenerateMembersCache 2017-11-07 14:38:18 -05:00
channelmanager.go rename some getters 2017-11-03 02:36:55 -04:00
channelreg.go server: Add proposed RENAME command 2017-06-04 20:01:37 -06:00
chanserv.go refactor synchronization for Channel 2017-10-22 19:50:16 -04:00
client_lookup_set.go refactor synchronization for Channel 2017-10-22 19:50:16 -04:00
client.go rename some getters 2017-11-03 02:36:55 -04:00
commands.go Add the INFO command 2017-10-29 07:59:56 +00:00
config.go make error recovery configurable 2017-10-26 04:19:01 -04:00
constants.go Setup 0.10.1-unreleased devel ver 2017-10-29 04:35:15 +00: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 Allow simple way of listing DLINEs and KLINEs 2017-10-15 07:53:24 +10:00
gateways.go add two getters 2017-10-15 19:46:25 -04:00
getters.go rename some getters 2017-11-03 02:36:55 -04:00
help.go Add the INFO command 2017-10-29 07:59:56 +00:00
idletimer.go review fixes 2017-10-15 22:37:36 -04:00
kline.go Allow simple way of listing DLINEs and KLINEs 2017-10-15 07:53:24 +10: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 rename some getters 2017-11-03 02:36:55 -04:00
monitor.go rename some getters 2017-11-03 02:36:55 -04:00
nickname.go rename some getters 2017-11-03 02:36:55 -04: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 rename some getters 2017-11-03 02:36:55 -04:00
snomanager.go Rename deps 2017-06-15 10:14:19 -06: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 General comments, fix misspellings and lints 2017-06-19 14:53:16 -06:00