Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Created February 12, 2015 01:09
Show Gist options
  • Save yifan-gu/4df5727b3877a41781a2 to your computer and use it in GitHub Desktop.
Save yifan-gu/4df5727b3877a41781a2 to your computer and use it in GitHub Desktop.
testsystemd.go
package main
import (
"fmt"
"github.com/coreos/go-systemd/dbus"
)
func main() {
fmt.Println("first")
conn, err := dbus.New()
if err != nil {
fmt.Println(err)
return
}
conn.Close()
fmt.Println("second")
conn, err = dbus.New() // panic here
if err != nil {
fmt.Println(err)
return
}
conn.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment