--- a/project_files/frontlib/net/netconn.c Tue Jul 10 19:40:10 2012 +0200
+++ b/project_files/frontlib/net/netconn.c Wed Jul 11 01:40:35 2012 +0200
@@ -620,6 +620,11 @@
}
flib_netmsg_destroy(netmsg);
}
+
+ if(!exit && !conn->destroyRequested && !flib_netbase_connected(net)) {
+ conn->netconnState = NETCONN_STATE_DISCONNECTED;
+ conn->onDisconnectedCb(conn->onDisconnectedCtx, NETCONN_DISCONNECT_CONNLOST, "Connection lost");
+ }
}
void flib_netconn_tick(flib_netconn *conn) {
--- a/project_files/frontlib/net/netconn.h Tue Jul 10 19:40:10 2012 +0200
+++ b/project_files/frontlib/net/netconn.h Wed Jul 11 01:40:35 2012 +0200
@@ -37,6 +37,7 @@
#define NETCONN_DISCONNECT_NORMAL 0
#define NETCONN_DISCONNECT_SERVER_TOO_OLD 1
#define NETCONN_DISCONNECT_AUTH_FAILED 2 // TODO can you retry instead?
+#define NETCONN_DISCONNECT_CONNLOST 3
#define NETCONN_DISCONNECT_INTERNAL_ERROR 100
#define NETCONN_ROOMLEAVE_ABANDONED 0