Skip to content

Commit

Permalink
Remove misdesigned exception from ReliablePacketBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron55 committed Jun 4, 2012
1 parent f488822 commit ed772da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
<<" != sp->reliable="<<sp->reliable
<<std::endl;

// If chunk already exists, cancel
// If chunk already exists, ignore it.
// Sometimes two identical packets may arrive when there is network
// lag and the server re-sends stuff.
if(sp->chunks.find(chunk_num) != NULL)
throw AlreadyExistsException("Chunk already in buffer");
return SharedBuffer<u8>();

// Cut chunk data out of packet
u32 chunkdatasize = p.data.getSize() - headersize;
Expand Down

0 comments on commit ed772da

Please sign in to comment.