Merge pull request #843 from milosgajdos83/dead-code
Clean up dead tunnel code
This commit is contained in:
commit
49fe5d9fd5
@ -919,14 +919,12 @@ func (t *tun) Close() error {
|
||||
default:
|
||||
close(t.closed)
|
||||
t.connected = false
|
||||
}
|
||||
|
||||
// send a close message
|
||||
// we don't close the link
|
||||
// just the tunnel
|
||||
return t.close()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Dial an address
|
||||
|
@ -98,7 +98,6 @@ func (l *link) Close() error {
|
||||
return nil
|
||||
default:
|
||||
close(l.closed)
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -181,5 +181,4 @@ func (t *tunListener) Accept() (Session, error) {
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -237,8 +237,6 @@ func (s *session) Send(m *transport.Message) error {
|
||||
case <-s.closed:
|
||||
return io.EOF
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Recv is used to receive a message
|
||||
|
Loading…
x
Reference in New Issue
Block a user