Browse Source

Fix: missing defer -- mutex wasn't properly locked

Rod Hynes 8 years ago
parent
commit
3919888e8a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      psiphon/common/tun/tun.go

+ 1 - 1
psiphon/common/tun/tun.go

@@ -468,7 +468,7 @@ func (server *Server) resumeSession(session *session, channel *Channel) {
 func (server *Server) interruptSession(session *session) {
 
 	session.mutex.Lock()
-	session.mutex.Unlock()
+	defer session.mutex.Unlock()
 
 	wasRunning := (session.channel != nil)