diff --git a/tunnel/default.go b/tunnel/default.go index 6107021e..c65829b1 100644 --- a/tunnel/default.go +++ b/tunnel/default.go @@ -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 + // send a close message + // we don't close the link + // just the tunnel + return t.close() } // Dial an address diff --git a/tunnel/link.go b/tunnel/link.go index f2395727..181121e7 100644 --- a/tunnel/link.go +++ b/tunnel/link.go @@ -98,7 +98,6 @@ func (l *link) Close() error { return nil default: close(l.closed) - return nil } return nil diff --git a/tunnel/listener.go b/tunnel/listener.go index ee394519..f154b2a6 100644 --- a/tunnel/listener.go +++ b/tunnel/listener.go @@ -181,5 +181,4 @@ func (t *tunListener) Accept() (Session, error) { } return c, nil } - return nil, nil } diff --git a/tunnel/session.go b/tunnel/session.go index 5d93fc32..6757f150 100644 --- a/tunnel/session.go +++ b/tunnel/session.go @@ -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