mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
safesocket: remove ConnectionStrategy (#10662)
This type seems to be a migration shim for TCP tailscaled sockets (instead of unix/windows pipes). The `port` field was never set, so it was effectively used as a string (`path` field). Remove the whole type and simplify call sites to pass the socket path directly to `safesocket.Connect`. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
@@ -85,13 +85,13 @@ func (fc plan9FileConn) SetWriteDeadline(t time.Time) error {
|
||||
return syscall.EPLAN9
|
||||
}
|
||||
|
||||
func connect(s *ConnectionStrategy) (net.Conn, error) {
|
||||
f, err := os.OpenFile(s.path, os.O_RDWR, 0666)
|
||||
func connect(path string) (net.Conn, error) {
|
||||
f, err := os.OpenFile(path, os.O_RDWR, 0666)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return plan9FileConn{name: s.path, file: f}, nil
|
||||
return plan9FileConn{name: path, file: f}, nil
|
||||
}
|
||||
|
||||
// Create an entry in /srv, open a pipe, write the
|
||||
|
Reference in New Issue
Block a user