RPC error (#23)

This commit is contained in:
Julien Neuhart
2018-12-12 12:20:07 +01:00
committed by GitHub
parent 6ee1932cbf
commit 1ef21c6ed6
3 changed files with 11 additions and 7 deletions

View File

@@ -54,8 +54,9 @@ func (c *Chrome) getFullname() string {
func (c *Chrome) isViable() bool {
// check if Chrome is correctly running.
devt := devtool.New("http://127.0.0.1:9222")
_, err := devt.Create(context.TODO())
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
_, err := devtool.New("http://localhost:9222").Version(ctx)
return err == nil
}