Updates: defer the mutex unlock

This commit is contained in:
Alex P 2025-09-09 22:03:35 +00:00
parent f48c3fe25a
commit e0b6e612c0
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@ var microphoneMuteState struct {
func SetAudioMuted(muted bool) {
audioMuteState.mu.Lock()
defer audioMuteState.mu.Unlock()
audioMuteState.muted = muted
audioMuteState.mu.Unlock()
}
func IsAudioMuted() bool {
@ -28,8 +28,8 @@ func IsAudioMuted() bool {
func SetMicrophoneMuted(muted bool) {
microphoneMuteState.mu.Lock()
defer microphoneMuteState.mu.Unlock()
microphoneMuteState.muted = muted
microphoneMuteState.mu.Unlock()
}
func IsMicrophoneMuted() bool {