Skip to content

Commit

Permalink
minecraft/packet.go: Revert #198, closes #199.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Sep 20, 2023
1 parent 196fe9a commit 00779f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion minecraft/packet.go
Expand Up @@ -46,7 +46,8 @@ func (p *packetData) decode(conn *Conn) (pks []packet.Packet, err error) {
if err == nil {
return
}
if _, ok := err.(unknownPacketError); ok && conn.disconnectOnInvalidPacket {
if _, ok := err.(unknownPacketError); ok || conn.disconnectOnInvalidPacket {
fmt.Println("Closing!")
_ = conn.Close()
}
}()
Expand Down

0 comments on commit 00779f2

Please sign in to comment.