From bdbab39aa0dab90a69dee4bc9eed739d9e98eea3 Mon Sep 17 00:00:00 2001 From: Alexander Menzhinsky Date: Tue, 23 Oct 2018 15:49:56 +0300 Subject: [PATCH] Remove environment mutex --- conn.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/conn.go b/conn.go index 7f33d98e..6d677995 100644 --- a/conn.go +++ b/conn.go @@ -15,7 +15,6 @@ var ( systemBusLck sync.Mutex sessionBus *Conn sessionBusLck sync.Mutex - sessionEnvLck sync.Mutex ) // ErrClosed is the error returned by calls on a closed connection. @@ -82,8 +81,6 @@ func SessionBus() (conn *Conn, err error) { } func getSessionBusAddress() (string, error) { - sessionEnvLck.Lock() - defer sessionEnvLck.Unlock() address := os.Getenv("DBUS_SESSION_BUS_ADDRESS") if address != "" && address != "autolaunch:" { return address, nil