From: Кирилл on
Hi all,
I have got a small script for upload file on http server, and I need
interrupt uploading if I get tired wait.
I create socket:

self.conn = httplib.HTTPConnection("")
#self.conn.debuglevel = 1
self.conn.request("POST", "/upload/", body, head)
if self.conn.sock:
self.conn.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
struct.pack("ii", 1, 0))

and close it in other thread:

if self.conn.sock:

Python notify me what socket have closed, but he continues to send
As can I close it and stop sending of the data?

Best Regards,