Skip to content

Commit

Permalink
fixed a Disconnect bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspecky committed Jan 6, 2024
1 parent 085b2b0 commit 6a7a01a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,16 @@ function Connection.Disconnect<U...>(self: Connection<U...>)
-- when no more fire calls are sitting on it.
local signal = self._signal
if signal._handlerListHead == self then
signal._handlerListHead = self._next
else
local prev = signal._handlerListHead
local next = prev._next
while prev and next ~= self do
prev = next
end
if prev then
prev._next = self._next
end
end
signal._handlerListHead = self._next
else
local prev = signal._handlerListHead
while prev and prev._next ~= self do
prev = prev._next
end
if prev then
prev._next = self._next
end
end
end

--[=[
Expand Down
2 changes: 1 addition & 1 deletion src/wally.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-oriented-house/lemonsignal"
version = "1.4.0"
version = "1.5.0"
registry = "https://github.com/UpliftGames/wally-index"
licence = "MIT"
authors = ["Aspecky", "Sona"]
Expand Down

0 comments on commit 6a7a01a

Please sign in to comment.