diff options
author | Wolfy-J <[email protected]> | 2018-06-23 17:55:52 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-23 17:55:52 +0300 |
commit | 918e7de39e16eb293567427f2e8e8c3035690163 (patch) | |
tree | a50fad82b2c8a94a0466f8ab2fa2e2adf5f502e5 /server_config.go | |
parent | 8d234dcb0dc8a8cf1badcd979833b468279f46de (diff) |
one way destruction of the pool
Diffstat (limited to 'server_config.go')
-rw-r--r-- | server_config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server_config.go b/server_config.go index ecd7dd2b..b927c8c6 100644 --- a/server_config.go +++ b/server_config.go @@ -5,6 +5,7 @@ import ( "net" "os/exec" "strings" + "syscall" "time" ) @@ -51,6 +52,10 @@ func (cfg *ServerConfig) makeFactory() (Factory, error) { return nil, errors.New("invalid relay DSN (pipes, tcp://:6001, unix://rr.sock)") } + if dsn[0] == "unix" { + syscall.Unlink(dsn[1]) + } + ln, err := net.Listen(dsn[0], dsn[1]) if err != nil { return nil, err |