Home › Forums › Support › "Timeout occurred after 1000ms waiting for response packet of type 'Data Table'" › Reply To: "Timeout occurred after 1000ms waiting for response packet of type 'Data Table'"
June 25, 2013 at 06:52
#939
Anonymous
Inactive
If I run this code it works perfectly:
NetworkComms.AppendGlobalIncomingPacketHandler<string>("RequestString", (packetHeader, connection, input) =>
{
//For this short example we just reply with a new CustomObject
string myCustomObject = "Hejsan";
myCustomObject += "2";
/*DataTable t = sql.RetrieveAllTables();
string temp = "";
t.WriteXml(temp);*/
//listBoxLog.Items.Add(myCustomObject);
//When this is received by the client it will complete the synchronous request
connection.SendObject("StringReply", myCustomObject);
});
But if I add some more code, which has nothing to do with the object being sent it returns the Timeout error:
NetworkComms.AppendGlobalIncomingPacketHandler<string>("RequestString", (packetHeader, connection, input) =>
{
//For this short example we just reply with a new CustomObject
string myCustomObject = "Hejsan";
myCustomObject += "2";
DataTable t = sql.RetrieveAllTables();
string temp = "";
t.WriteXml(temp);
//listBoxLog.Items.Add(myCustomObject);
//When this is received by the client it will complete the synchronous request
connection.SendObject("StringReply", myCustomObject);
});
Can someone please help me explain why?
Thanks in advance!