Skip to content

Commit

Permalink
fix(vc): disconnect
Browse files Browse the repository at this point in the history
Ciao bello ciao
  • Loading branch information
TheTipo01 committed Oct 26, 2023
1 parent ed5bbb5 commit 38ed350
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vc/vc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ func (v *VC) GetChannelID() string {
}

func (v *VC) Disconnect() {
if v.isConnectionNil() {
_ = v.vc.Disconnect()

if !v.isConnectionNil() {
v.rw.Lock()
defer v.rw.Unlock()

_ = v.vc.Disconnect()
v.vc = nil
v.rw.Unlock()
}
}

Expand Down

0 comments on commit 38ed350

Please sign in to comment.