Sunday
12
Feb 2006

Twisted gotcha: socket error 32 broken pipe

(12:57 am) Tags: [Software, Rants]

If you happen to be using Twisted, and you are using the LineReceiver protocol as your base protocol, and you keep seeing socket errors, specifically error 32 ‘broken pipe’, it may not be your fault…

LineReceiver has a property MAX_LENGTH, defaulting to 16384 (16K), after which your socket connection gets tossed without error. WTF? At least give me an error that I should deal with!

Obviously, to get around the problem, you just need to redefine the MAX_LENGTH property in your subclass of LineReceiver.

I am torn on this one. I understand the Twisted programmers were trying to defend me from (myself | others), but I was hoping for at least an exception. Is that too much to ask for? That’s about 8 hours of my life I won’t get back.

Popularity: 74%

Comments: (0)