Skip to content

Commit

Permalink
Merge pull request #6 from SolskGaer/correctly-init-the-device-get-fr…
Browse files Browse the repository at this point in the history
…om-listen

correctly init the device from listen
  • Loading branch information
electricbubble authored Jun 9, 2021
2 parents 00c0d0e + dadcd3d commit ac5f6d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion usbmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package giDevice

import (
"context"

"github.com/electricbubble/gidevice/pkg/libimobiledevice"
)

Expand Down Expand Up @@ -98,7 +99,11 @@ func (um *usbmux) Listen(devNotifier chan Device) (context.CancelFunc, error) {
if baseDev.MessageType != libimobiledevice.MessageTypeDeviceAdd {
baseDev.Properties.DeviceID = baseDev.DeviceID
}
devNotifier <- newDevice(um.client, baseDev.Properties)
client, err := libimobiledevice.NewUsbmuxClient()
if err != nil {
continue
}
devNotifier <- newDevice(client, baseDev.Properties)
}
}
}(ctx)
Expand Down

0 comments on commit ac5f6d4

Please sign in to comment.