Closed mpe closed 9 years ago
Hi Michael, good catch, thanks for the report. Indeed I think it'd be best fixed in goirc by making Nick safe for concurrent access, maybe with a mutex to protect https://github.com/fluffle/goirc/blob/master/state%2Fnick.go#L15. I opened an issue in goirc https://github.com/fluffle/goirc/issues/49
goirc was refactored to fix this, I updated goircbot accordingly in https://github.com/StalkR/goircbot/commit/d1b83c5e95067ef1af37d1992428b77f84310c25 The df race should be fixed now, do you confirm? please reopen if not. I see another with the renick plugin though, opened https://github.com/StalkR/goircbot/issues/10 to track.
Looks good to me.
Using the example bot, with the df limit altered so it fires, I see:
This seems to be a basic problem with anything that sends from another goroutine.
I guess the best fix is in goirc, so close this if you like, but I thought I'd at least document it for others.