fix(irc): improve IRC handler management (#1269)

* fix some races in IRC handler management

* remove go 1.21 and slices package

* chore: update deps

* fix: use exp/slices pkg and client callbacks

* fix(irc): remove deadlock mutex from authenticate

* restore locking in authenticate()

* fix(irc): data races

* fix(irc): do not allow restart of disabled network

* fix(irc): disable restart btn if net disabled

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
Shivaram Lingamneni 2023-12-12 11:29:43 -08:00 committed by GitHub
parent 17e97201fd
commit b2c32a421e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 230 additions and 194 deletions

View file

@ -536,14 +536,20 @@ const ListItemDropdown = ({
{({ active }) => (
<button
className={classNames(
active ? "bg-blue-600 text-white" : "text-gray-900 dark:text-gray-300",
"font-medium group flex rounded-md items-center w-full px-2 py-2 text-sm"
"font-medium group flex rounded-md items-center w-full px-2 py-2 text-sm",
network.enabled
? active ? "bg-blue-600 text-white" : "text-gray-900 dark:text-gray-300"
: "text-gray-600 dark:text-gray-500"
)}
onClick={() => restart(network.id)}
disabled={!network.enabled}
title={network.enabled ? "Restart" : "Network disabled"}
>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={classNames(
active ? "text-white" : "text-blue-500",
"w-5 h-5 mr-2"
"w-5 h-5 mr-2",
network.enabled
? active ? "text-white" : "text-blue-500 dark:text-blue-500"
: "text-gray-600 dark:text-gray-500"
)}>
<path strokeLinecap="round" strokeLinejoin="round" d="M5.636 5.636a9 9 0 1012.728 0M12 3v9" />
</svg>