Wait for a couple of seconds to handle all pending socket events before
stopping to read packets.