mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Clean up dead tunnel code
Running go vet on tunnel package returns: $ go vet ./... ./default.go:929:2: unreachable code ./link.go:104:2: unreachable code ./listener.go:184:2: unreachable code ./session.go:241:2: unreachable code
This commit is contained in:
parent
e351e9518f
commit
21469a0427
@ -919,6 +919,7 @@ func (t *tun) Close() error {
|
||||
default:
|
||||
close(t.closed)
|
||||
t.connected = false
|
||||
}
|
||||
|
||||
// send a close message
|
||||
// we don't close the link
|
||||
@ -926,9 +927,6 @@ func (t *tun) Close() error {
|
||||
return t.close()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Dial an address
|
||||
func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
|
||||
log.Debugf("Tunnel dialing %s", channel)
|
||||
|
@ -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…
Reference in New Issue
Block a user