TimeOut Exception while doRpcCall-Importing contacts in TeleGram java API -
i trying add , import contact sending message getting time out exception every time. correct me if wrong.
code:
tlinputcontact tlic=new tlinputcontact(1, phno, fname, lname); tlvector contacts = new tlvector<>(); contacts.add(tlic); tlrequestcontactsimportcontacts importcontacts = new tlrequestcontactsimportcontacts(contacts, true); tlimportedcontacts importedcontacts = api.dorpccall(importcontacts); tlabsuser recipient=importedcontacts.getusers().get(0); tlinputpeercontact peer = new tlinputpeercontact(recipient.getid()); tlrequestmessagessendmessage sendmessagerequest = new tlrequestmessagessendmessage(peer, "test", rnd.nextint()); tlabssentmessage sentmessage = api.dorpccall(sendmessagerequest); log:: telegramapi#1001:timeout iteration actordispatcher:dispatching action: schedule scheduller actordispatcher:dispatching action: schedule scheduller telegramapi#1001:timeout iteration telegramapi#1001:rpc #3: timeout (15001 ms) exception in thread "main" org.telegram.api.engine.timeoutexception @ org.telegram.api.engine.telegramapi.dorpccall(telegramapi.java:364) @ org.telegram.api.engine.telegramapi.dorpccall(telegramapi.java:309) @ org.telegram.api.engine.telegramapi.dorpccall(telegramapi.java:400) @ org.telegram.api.engine.telegramapi.dorpccall(telegramapi.java:396) @ testmsg.testmsg.main(testmsg.java:151) telegramapi#1001:timeout iteration
try dorpccallside
instead of dorpccall
in telegramapi object.
helped me.
Comments
Post a Comment