return message ids with send_http too

This commit is contained in:
ThomasV 2013-12-21 19:27:49 +01:00
parent 48a739f714
commit f4f418e9ec
1 changed files with 3 additions and 0 deletions

View File

@ -244,11 +244,13 @@ class Interface(threading.Thread):
t1 = time.time()
data = []
ids = []
for m in messages:
method, params = m
if type(params) != type([]): params = [params]
data.append( { 'method':method, 'id':self.message_id, 'params':params } )
self.unanswered_requests[self.message_id] = method, params, callback
ids.append(self.message_id)
self.message_id += 1
if data:
@ -291,6 +293,7 @@ class Interface(threading.Thread):
self.rtime = time.time() - t1
self.is_connected = True
return ids