Check for nil ln during Close()
@@ -80,8 +80,11 @@ func (t *Transport) Accept() (net.Conn, error) {
// Close closes the transport
func (t *Transport) Close() error {
+ if t.ln != nil {
return t.ln.Close()
}
+ return nil
+}
// Addr returns the binding address of the transport.
func (t *Transport) Addr() net.Addr {
