Skip to content

Commit e3791f9

Browse files
Send replies on the appropriate socket (Jupyter messaging protocol v5.4)
1 parent 180f40f commit e3791f9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/comm_manager.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function comm_info_request(sock, msg)
5959
end
6060
content = Dict(:comms => _comms)
6161

62-
send_ipython(IJulia.publish[],
62+
send_ipython(sock,
6363
msg_reply(msg, "comm_info_reply", content))
6464
end
6565

src/handlers.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function complete_request(socket, msg)
154154
end
155155

156156
function kernel_info_request(socket, msg)
157-
send_ipython(requests[],
157+
send_ipython(socket,
158158
msg_reply(msg, "kernel_info_reply",
159-
Dict("protocol_version" => "5.0",
159+
Dict("protocol_version" => "5.4",
160160
"implementation" => "ijulia",
161161
"implementation_version" => pkgversion(@__MODULE__),
162162
"language_info" =>
@@ -189,7 +189,7 @@ function connect_request(socket, msg)
189189
end
190190

191191
function shutdown_request(socket, msg)
192-
send_ipython(requests[], msg_reply(msg, "shutdown_reply",
192+
send_ipython(socket, msg_reply(msg, "shutdown_reply",
193193
msg.content))
194194
sleep(0.1) # short delay (like in ipykernel), to hopefully ensure shutdown_reply is sent
195195
exit()
@@ -271,7 +271,7 @@ end
271271

272272
function interrupt_request(socket, msg)
273273
@async Base.throwto(requests_task[], InterruptException())
274-
send_ipython(requests[], msg_reply(msg, "interrupt_reply", Dict()))
274+
send_ipython(socket, msg_reply(msg, "interrupt_reply", Dict()))
275275
end
276276

277277
function unknown_request(socket, msg)

src/msg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msg_header(m::Msg, msg_type::String) = Dict("msg_id" => uuid4(),
2020
"session" => m.header["session"],
2121
"date" => now(),
2222
"msg_type" => msg_type,
23-
"version" => "5.3")
23+
"version" => "5.4")
2424

2525
# PUB/broadcast messages use the msg_type as the ident, except for
2626
# stream messages which use the stream name (e.g. "stdout").

0 commit comments

Comments
 (0)