Skip to content

Commit b3eb0a4

Browse files
Update service/service_stream_utility.go
Co-authored-by: Luca Rinaldi <lucarin@protonmail.com>
1 parent e4cbc44 commit b3eb0a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/service_stream_utility.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ type SynchronizedSender[T any] struct {
1313
// Send the message using the underlyng stream.
1414
func (s *SynchronizedSender[T]) Send(value T) error {
1515
s.lock.Lock()
16+
defer s.lock.Unlock()
1617
err := s.protectedSend(value)
17-
s.lock.Unlock()
1818
return err
1919
}
2020

0 commit comments

Comments
 (0)