I commented two lines in peer_dbs (see https://github.com/P2PSP/simulator/blob/master/src/core/peer_dbs.py#L610)
The reason of those lines is to send pending chunks before leaving the team in a polite way. However, it freezes the peer in a receive call.