summaryrefslogtreecommitdiff
path: root/irc/typing.go
diff options
context:
space:
mode:
Diffstat (limited to 'irc/typing.go')
-rw-r--r--irc/typing.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/irc/typing.go b/irc/typing.go
index 4a8cf55..128f83d 100644
--- a/irc/typing.go
+++ b/irc/typing.go
@@ -72,9 +72,10 @@ func (ts *Typings) Active(target, name string) {
time.Sleep(6 * time.Second)
ts.l.Lock()
- defer ts.l.Unlock()
+ closed := ts.closed
+ ts.l.Unlock()
- if !ts.closed {
+ if !closed {
ts.timeouts <- t
}
}()