File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
lua/entities/gmod_wire_expression2/core Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,8 @@ flushFileBuffer = function()
338338 net .Start (" wire_expression2_file_download" )
339339 net .WriteString (name or " " )
340340 net .WriteBool (fdata .append )
341- net .WriteStream (data , function ()
341+
342+ local finished_cb = function ()
342343 fdata .downloaded = true
343344 fdata .downloading = false
344345
@@ -354,7 +355,14 @@ flushFileBuffer = function()
354355 if # queue ~= 0 then -- Queue the next file
355356 timer .Create (" wire_expression2_flush_file_buffer" , 0.2 , 2 , flushFileBuffer )
356357 end
357- end )
358+ end
359+
360+ if # data == 0 then
361+ net .WriteUInt (0 , 32 )
362+ finished_cb ()
363+ else
364+ net .WriteStream (data , finished_cb )
365+ end
358366 net .Send (ply )
359367 end
360368 end
You can’t perform that action at this time.
0 commit comments