summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b42da28)
raw | patch | inline | side by side (parent: b42da28)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 16 Oct 2019 18:57:35 +0000 (21:57 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 16 Oct 2019 18:57:47 +0000 (21:57 +0300) |
src/game/g_netmaster.pas | patch | blob | history |
index 393c4e572fc5191271ce324832860541376bfb79..e696d873a41e14ac95dc8f0b220ffbdfe1e2b27f 100644 (file)
--- a/src/game/g_netmaster.pas
+++ b/src/game/g_netmaster.pas
if (ct < stt) or (ct-stt >= 1500) then break;
sres := enet_host_service(NetMHost, @NetMEvent, 100);
- if (sres < 0) then break;
- if (sres = 0) then continue;
+ // if (sres < 0) then break;
+ if (sres <= 0) then continue;
idx := findByPeer(NetMEvent.peer);
if (idx < 0) then
NetMHost := enet_host_create(nil, 64, NET_MCHANS, 1024*1024, 1024*1024);
if (NetMHost = nil) then
begin
- g_Console_Add(_lc[I_NET_MSG_ERROR]+_lc[I_NET_ERR_CLIENT], True);
+ e_LogWriteln(_lc[I_NET_MSG_ERROR] + _lc[I_NET_ERR_CLIENT] + ' (host_create)', TMsgType.Notify);
for f := 0 to High(mlist) do mlist[f].clear();
SetLength(mlist, 0);
Exit;
end;
sres := enet_host_service(NetMHost, @NetMEvent, timeout);
- while (sres <> 0) do
+ while (sres > 0) do
begin
if (sres < 0) then
begin
- g_Console_Add(_lc[I_NET_MSG_ERROR]+_lc[I_NET_ERR_CLIENT], True);
+ e_LogWriteln(_lc[I_NET_MSG_ERROR] + _lc[I_NET_ERR_CLIENT] + ' (host_service)', TMsgType.Notify);
for f := 0 to High(mlist) do mlist[f].clear();
SetLength(mlist, 0);
enet_host_destroy(NetMHost);