Skip to content

Commit 2e5ca7a

Browse files
committed
protect Reset while we are at it
1 parent c2139ba commit 2e5ca7a

File tree

1 file changed

+2
-0
lines changed
  • coderd/notifications/dispatch/smtptest

1 file changed

+2
-0
lines changed

coderd/notifications/dispatch/smtptest/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ func (b *Backend) LastMessage() *Message {
6868
}
6969

7070
func (b *Backend) Reset() {
71+
b.mu.Lock()
72+
defer b.mu.Unlock()
7173
b.lastMsg = nil
7274
}
7375

0 commit comments

Comments
 (0)