mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-04 07:08:32 +00:00
Close conn when read connect packet error (#136)
This commit is contained in:
@@ -272,6 +272,7 @@ func (b *Broker) handleConnection(typ int, conn net.Conn) {
|
||||
packet, err := packets.ReadPacket(conn)
|
||||
if err != nil {
|
||||
log.Error("read connect packet error: ", zap.Error(err))
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
if packet == nil {
|
||||
|
||||
Reference in New Issue
Block a user