Skip to content

Commit

Permalink
windows: hack to get around golang/go#55015
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Sep 17, 2023
1 parent 2a67aea commit cfaf280
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions adapter_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ var DefaultAdapter = &Adapter{
// Enable configures the BLE stack. It must be called before any
// Bluetooth-related calls (unless otherwise indicated).
func (a *Adapter) Enable() error {
// hack to get around https://github.com/golang/go/issues/55015
go func() {
<-time.After(24 * 365 * time.Hour)
}()

return ole.RoInitialize(1) // initialize with multithreading enabled
}

Expand Down

0 comments on commit cfaf280

Please sign in to comment.