File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ brave.on('loadProtoBySocket', function (param)
5454
5555 function lsmaster :on_data (data )
5656 lsclient :write (data )
57- net .update ()
57+ -- net.update()
5858 end
5959
6060 while true do
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ function m.send(data)
5555 io.write (buf )
5656 elseif m .mode == ' socket' then
5757 m .client :write (buf )
58- net .update ()
5958 end
6059end
6160
@@ -258,15 +257,9 @@ function m.listen(mode, socketPort)
258257 }
259258 m .client = dummyClient
260259
261- local t = timer .loop (0.1 , function ()
262- net .update ()
263- end )
264-
265260 function server :on_accepted (client )
266- t :remove ()
267261 m .client = client
268262 client :write (dummyClient .buf )
269- net .update ()
270263 end
271264
272265 pub .task (' loadProtoBySocket' , {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ local ws = require 'workspace'
1212local time = require ' bee.time'
1313local fw = require ' filewatch'
1414local furi = require ' file-uri'
15+ local net = require ' service.net'
1516
1617require ' jsonc'
1718require ' json-beautify'
@@ -168,6 +169,7 @@ function m.eventLoop()
168169 end
169170
170171 local function doSomething ()
172+ net .update ()
171173 timer .update ()
172174 pub .step (false )
173175 if await .step () then
@@ -180,7 +182,7 @@ function m.eventLoop()
180182 local function sleep ()
181183 idle ()
182184 for _ = 1 , 10 do
183- thread . sleep (100 )
185+ net . update (100 )
184186 if doSomething () then
185187 return
186188 end
You can’t perform that action at this time.
0 commit comments