fix runaway CPU usage when nrepl connected
This commit is contained in:
parent
1bcea81f43
commit
a7dd68bd32
|
@ -96,7 +96,7 @@
|
|||
(local (port host) (values (or opt.port 7888) (or opt.host :localhost)))
|
||||
(set self.connection (assert (socket.connect host port)))
|
||||
(self.connection:settimeout 0)
|
||||
(core.add_thread #(while true (self:receive) (coroutine.yield)) self)
|
||||
(core.add_thread #(while true (self:receive) (coroutine.yield 0.1)) self)
|
||||
(self:send {:op :clone}
|
||||
{:new-session #(do (set self.default-session $2)
|
||||
(when opt.on-connect (opt.on-connect self)))})))
|
||||
|
|
Loading…
Reference in a new issue