Python BOT keeps disconnecting, even with PONGs

That’s so strange, have been thinking about if the bot just stops doing the s.recv(1024) function for some reason? But I don’t see why it would do that?