tttdamagelogs icon indicating copy to clipboard operation
tttdamagelogs copied to clipboard

Net message error on DL_SendOldLog

Open iViscosity opened this issue 4 years ago • 0 comments

Was experimenting and getting this setup for a server, and ran into a bug. When loading old logs, this error is thrown on server:

[ERROR] Warning! A net message (DL_SendOldLog) is already started! Discarding in favor of the 
new message! (DL_SendOldLog)

  1. SendLogs - addons/tttdamagelogs-3.1.0/lua/damagelogs/server/oldlogs.lua:184
   2. func - addons/tttdamagelogs-3.1.0/lua/damagelogs/server/oldlogs.lua:247
    3. unknown - lua/includes/extensions/net.lua:32

Looking at the cause, it seems net.Start("DL_SendOldLog") is called more than once, for some reason. Twice when requesting old logs: https://github.com/Tommy228/tttdamagelogs/blob/master/lua/damagelogs/server/oldlogs.lua#L282, https://github.com/iViscosity/tttdamagelogs/blob/master/lua/damagelogs/server/oldlogs.lua#L297

and another time in the function SendLogs (which this net message calls): https://github.com/iViscosity/tttdamagelogs/blob/master/lua/damagelogs/server/oldlogs.lua#L218

Error can be fixed by just removing those two referenced lines in net.Receive("DL_AskOldLog")

iViscosity avatar May 21 '20 17:05 iViscosity