Salut Gem,

Merci pour votre réponse,

I still haven't managed to get to the bottom of what is happening, but the 
error always seems to occur when the read function is called from line 77, but 
by this point it should already have read stuff from the socket (unless I am 
mistaken - quite possible!) so I don't understand why there isn't the rest of 
the message still there waiting to be read.

64    def myreceive(self):
65        def read(socket, size):
66            buf=''
67&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while len&#40;buf&#41; < size&#58;
68&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chunk = 
self.sock.recv&#40;size - len&#40;buf&#41;&#41;
69&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if chunk == ''&#58;
70&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raise 
RuntimeError, "socket connection broken"
71&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buf += chunk
72&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return buf
73
74&nbsp; &nbsp; &nbsp; &nbsp; size = int&#40;read&#40;self.sock, 8&#41;&#41;
75&nbsp; &nbsp; &nbsp; &nbsp; buf = read&#40;self.sock, 1&#41;
76&nbsp; &nbsp; &nbsp; &nbsp; exception = buf != '0' and buf or False
77&nbsp; &nbsp; &nbsp; &nbsp; res = cPickle.loads&#40;read&#40;self.sock, 
size&#41;&#41;


Anyway I have now changed the login settings to:

>     Server: 127.0.0.1
>     Port: 8069
>     Protocol Connection: XML-RPC
> 

and I have not had the problem reoccur (yet!), not a proper solution but it 
seems to have resolved the problem for now.

Thanks,

:-)    Dave.

-- 
David Harper




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=38341#38341

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to