Fix connection type switches

This commit is contained in:
Daniel
2021-03-22 13:46:22 +01:00
parent 60bdea7c50
commit 04d633a196
2 changed files with 4 additions and 4 deletions

View File

@@ -548,10 +548,10 @@ func (conn *Connection) delete() {
// A connection without an ID has been created from
// a DNS request rather than a packet. Choose the correct
// connection store here.
if conn.ID == "" {
dnsConns.delete(conn)
} else {
if conn.Type == IPConnection {
conns.delete(conn)
} else {
dnsConns.delete(conn)
}
conn.Meta().Delete()