Skip to content

Commit

Permalink
Remove references to controlSocket (it's unused) (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyCBB authored and n-riesco committed Jul 27, 2018
1 parent 9d59525 commit ad6217f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/zmq-kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class ZMQKernel extends KernelTransport {
options: Object;

shellSocket: Socket;
controlSocket: Socket;
stdinSocket: Socket;
ioSocket: Socket;

Expand Down Expand Up @@ -66,19 +65,16 @@ export default class ZMQKernel extends KernelTransport {
const { key } = this.connection;

this.shellSocket = new Socket("dealer", scheme, key);
this.controlSocket = new Socket("dealer", scheme, key);
this.stdinSocket = new Socket("dealer", scheme, key);
this.ioSocket = new Socket("sub", scheme, key);

const id = v4();
this.shellSocket.identity = `dealer${id}`;
this.controlSocket.identity = `control${id}`;
this.stdinSocket.identity = `dealer${id}`;
this.ioSocket.identity = `sub${id}`;

const address = `${this.connection.transport}://${this.connection.ip}:`;
this.shellSocket.connect(address + this.connection.shell_port);
this.controlSocket.connect(address + this.connection.control_port);
this.ioSocket.connect(address + this.connection.iopub_port);
this.ioSocket.subscribe("");
this.stdinSocket.connect(address + this.connection.stdin_port);
Expand Down Expand Up @@ -114,7 +110,7 @@ export default class ZMQKernel extends KernelTransport {

monitor(done: ?Function) {
try {
let socketNames = ["shellSocket", "controlSocket", "ioSocket"];
let socketNames = ["shellSocket", "ioSocket"];

let waitGroup = socketNames.length;

Expand All @@ -137,7 +133,6 @@ export default class ZMQKernel extends KernelTransport {
};

monitor("shellSocket", this.shellSocket);
monitor("controlSocket", this.controlSocket);
monitor("ioSocket", this.ioSocket);
} catch (err) {
console.error("ZMQKernel:", err);
Expand Down Expand Up @@ -396,7 +391,6 @@ export default class ZMQKernel extends KernelTransport {
fs.unlinkSync(this.connectionFile);

this.shellSocket.close();
this.controlSocket.close();
this.ioSocket.close();
this.stdinSocket.close();

Expand Down

0 comments on commit ad6217f

Please sign in to comment.