nskinkel / oppy

A Tor client (onion proxy) implementation in Python
BSD 3-Clause "New" or "Revised" License
24 stars 3 forks source link

Handle Case Where `Connection.dataReceived()` Only Gets the Prefix of A Cell #66

Closed dwtj closed 9 years ago

dwtj commented 9 years ago

As we receive incoming (i.e. backwards) cell data at the connection, we may not receive enough data for an entire cell because of how the IP stack and the Twisted reactor buffers cell data.

I think that this is why as of commit 2c258bd9, we are seeing the occasional ValueError('Not enough data to make a cell.').

I think that if we are going handle the case of receiving only a cell's prefix using try-except, in OnionConnection.dataRecieved(), then the error should not be packaged as ValueError(), because this gets mixed together other kinds of ValueError()s that might crop up while debugging.

nskinkel commented 9 years ago

closed in #76