 
     process.standardOutput = self.writer
 
-    process.terminationHandler = { [unowned self] _ in
-      self.finish()
+    process.terminationHandler = { [weak self] _ in
+      self?.finish()
     }
 
     process.launch()

  */
  func handleDisconnect(for code: Int) {
    guard CloseOP(rawValue: code) != nil else {
      print("[Sword] Voice connection closed with unrecognized response\nCode: \(code)")
      
      return
    }
  }

      self.emit(.connectionClose)
    }
    
    self.heartbeat = nil
    self.isConnected = false
    self.encoder = nil
    
    #if !os(Linux)
    self.session?.disconnect()
    #else
    try? self.session?.close()
    #endif
    
    try? self.udpClient?.close()
  }

}
