File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/main/cljs/clojure/browser Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 31
31
(goog-define PORT 9000 )
32
32
33
33
(def xpc-connection (atom nil ))
34
+ (def parent-connected? (atom false ))
34
35
(def print-queue (array ))
35
36
36
37
(defn flush-print-queue! [conn]
40
41
41
42
(defn repl-print [data]
42
43
(.push print-queue (pr-str data))
43
- (when-let [conn @xpc-connection]
44
- (flush-print-queue! conn )))
44
+ (when @parent-connected?
45
+ (flush-print-queue! @xpc-connection )))
45
46
46
47
(set! *print-newline* true )
47
48
(set-print-fn! repl-print)
220
221
; ; to ack once.
221
222
(when-not @connected?
222
223
(reset! connected? true )
224
+ (reset! parent-connected? true )
223
225
(net/transmit repl-connection
224
226
:ack-handshake
225
- nil ))))
227
+ nil )
228
+ (flush-print-queue! repl-connection))))
226
229
(net/register-service repl-connection
227
230
:evaluate-javascript
228
231
(fn [js]
You can’t perform that action at this time.
0 commit comments