Created
February 12, 2015 01:09
-
-
Save yifan-gu/4df5727b3877a41781a2 to your computer and use it in GitHub Desktop.
testsystemd.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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