diff --git a/connector/connection.go b/connector/connection.go index e9d1250f..06c08fca 100644 --- a/connector/connection.go +++ b/connector/connection.go @@ -21,8 +21,8 @@ type SSHConnection struct { // RunCommand runs a command against the device func (c *SSHConnection) RunCommand(cmd string) ([]byte, error) { - c.mu.Lock() - defer c.mu.Unlock() +// c.mu.Lock() +// defer c.mu.Unlock() if c.client == nil { return nil, errors.New("not connected") diff --git a/connector/connection_manager.go b/connector/connection_manager.go index 8a44ca56..a2d7ab59 100644 --- a/connector/connection_manager.go +++ b/connector/connection_manager.go @@ -66,8 +66,8 @@ func NewConnectionManager(opts ...Option) *SSHConnectionManager { // Connect connects to a device or returns an long living connection func (m *SSHConnectionManager) Connect(device *Device) (*SSHConnection, error) { - m.mu.Lock() - defer m.mu.Unlock() +// m.mu.Lock() +// defer m.mu.Unlock() if connection, found := m.connections[device.Host]; found { if !connection.isConnected() {