From 56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 5 Aug 2023 20:43:19 +0200 Subject: Update dependencies and remove old matterclient lib (#2067) --- vendor/github.com/olahol/melody/session.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vendor/github.com/olahol') diff --git a/vendor/github.com/olahol/melody/session.go b/vendor/github.com/olahol/melody/session.go index 879a724d..ad79d54f 100644 --- a/vendor/github.com/olahol/melody/session.go +++ b/vendor/github.com/olahol/melody/session.go @@ -223,6 +223,15 @@ func (s *Session) MustGet(key string) interface{} { panic("Key \"" + key + "\" does not exist") } +// UnSet will delete the key and has no return value +func (s *Session) UnSet(key string) { + s.rwmutex.Lock() + defer s.rwmutex.Unlock() + if s.Keys != nil { + delete(s.Keys, key) + } +} + // IsClosed returns the status of the connection. func (s *Session) IsClosed() bool { return s.closed() -- cgit v1.2.3