Skip to content

Commit ac9fec5

Browse files
authored
Removed unused code (#3)
1 parent 73e42a2 commit ac9fec5

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: server_listener.go

-20
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
"crypto/tls"
55
"crypto/x509"
66
"io/ioutil"
7-
"net"
8-
"os"
97
)
108

119
// generateTLSConfig generates a new TLS config based on given
@@ -35,21 +33,3 @@ func generateTLSConfig(certPath, keyPath, caCertPath string) (*tls.Config, error
3533
ClientCAs: certPool,
3634
}, nil
3735
}
38-
39-
// rmListener is an implementation of net.Listener that forwards most
40-
// calls to the listener but also removes a file as part of the close. We
41-
// use this to cleanup the unix domain socket on close.
42-
type rmListener struct {
43-
net.Listener
44-
Path string
45-
}
46-
47-
func (l *rmListener) Close() error {
48-
// Close the listener itself
49-
if err := l.Listener.Close(); err != nil {
50-
return err
51-
}
52-
53-
// Remove the file
54-
return os.Remove(l.Path)
55-
}

0 commit comments

Comments
 (0)