Open GoogleCodeExporter opened 9 years ago
I've updated and set the script to run in a python 2.6 env, this resolves the
class define error ( not like that was a big deal though ). Still receiving the
same Broken pipe errors.
Original comment by ma77o23...@gmail.com
on 27 Jan 2011 at 5:30
Uploading strace output.
strace.out = 1 connection
strace.out100 = 100 connections
Original comment by ma77o23...@gmail.com
on 27 Jan 2011 at 5:36
Attachments:
Are you certain a TCP connection can actually be opened to the target?
Can you try something like Netcat just to see if there is a listening socket on
the other side?
Original comment by ravivr@gmail.com
on 24 Nov 2011 at 2:26
I have the same problem. I get :
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "./rudy.py", line 179, in run
c.send("A")
File "./rudy.py", line 163, in send
self.s.send(data)
error: [Errno 32] Broken pipe
Original comment by NMilc...@gmail.com
on 24 Nov 2013 at 3:40
A quick fix would be to put those above lines in a Try Catch statement and at the exception call the function again. Below is the fixed code that runs completely fine.
class Client(Process):
def __init__(self,host,port,headers,proxy_addr,proxy_port):
Process.__init__(self)
self.host = host
self.port = port
self.headers = headers
self.proxy_addr = proxy_addr
self.proxy_port = proxy_port
def run(self):
try:
c = connection(self.host,self.port,self.headers,self.proxy_addr,self.proxy_port)
c.connect()
while 1:
c.send("A")
sleep(10)
except:
print "request sent!"
self.run()
Original issue reported on code.google.com by
ma77o23...@gmail.com
on 27 Jan 2011 at 5:23