Merge pull request #1229 from hashicorp/update-plugin

Updated go-plugin dependency
This commit is contained in:
Diptanu Choudhury 2016-06-08 05:36:07 -07:00
commit 66fc31ba91
3 changed files with 32 additions and 3 deletions

View file

@ -1 +0,0 @@
.DS_Store

View file

@ -183,5 +183,33 @@ func serverListener_unix() (net.Listener, error) {
return nil, err
}
return net.Listen("unix", path)
l, err := net.Listen("unix", path)
if err != nil {
return nil, err
}
// Wrap the listener in rmListener so that the Unix domain socket file
// is removed on close.
return &rmListener{
Listener: l,
Path: path,
}, nil
}
// rmListener is an implementation of net.Listener that forwards most
// calls to the listener but also removes a file as part of the close. We
// use this to cleanup the unix domain socket on close.
type rmListener struct {
net.Listener
Path string
}
func (l *rmListener) Close() error {
// Close the listener itself
if err := l.Listener.Close(); err != nil {
return err
}
// Remove the file
return os.Remove(l.Path)
}

4
vendor/vendor.json vendored
View file

@ -461,8 +461,10 @@
"revision": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
},
{
"checksumSHA1": "FK7oNTTXthoohAwDgVo/nmf1w9A=",
"path": "github.com/hashicorp/go-plugin",
"revision": "cccb4a1328abbb89898f3ecf4311a05bddc4de6d"
"revision": "6691772c4e872547b2e6cfc54c853a6d61bc0edb",
"revisionTime": "2016-06-02T23:01:53Z"
},
{
"path": "github.com/hashicorp/go-syslog",