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.
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
, inOnionConnection.dataRecieved()
, then the error should not be packaged asValueError()
, because this gets mixed together other kinds ofValueError()
s that might crop up while debugging.