Browse Source

Update IPC path and fix logging issue

master
David Ludwig 4 years ago
parent
commit
944f184a6b
3 changed files with 4 additions and 2 deletions
  1. +1
    -1
      .env.example
  2. +1
    -0
      Dockerfile
  3. +2
    -1
      src/server/services/TorrentClientIpc.ts

+ 1
- 1
.env.example View File

@ -1,2 +1,2 @@
SERVER_PORT = 3300
TORRENT_CLIENT_IPC_SOCKET = /tmp/torrent_client.sock
TORRENT_CLIENT_IPC_SOCKET = /var/autoplex/ipc/torrent_client.sock

+ 1
- 0
Dockerfile View File

@ -1,5 +1,6 @@
FROM node:14-alpine AS base
WORKDIR /app
RUN mkdir /var/autoplex && chown node:node -R /var/autoplex
# An image containing necessary components for building
FROM base AS builder


+ 2
- 1
src/server/services/TorrentClientIpc.ts View File

@ -35,6 +35,7 @@ export default class TorrentClientIpc
*/
public boot() {
return new Promise<void>((resolve, reject) => {
console.log(process.env["TORRENT_CLIENT_IPC_SOCKET"]);
ipc.connectTo("torrent_client", process.env["TORRENT_CLIENT_IPC_SOCKET"], () => {
this.socket = ipc.of["torrent_client"];
this.installSocketEventHandlers(this.socket);
@ -60,7 +61,7 @@ export default class TorrentClientIpc
// Socket Event Handlers -----------------------------------------------------------------------
protected onConnect() {
if (this.__isConnected) {
if (!this.__isConnected) {
console.log("IPC: Connection established");
}
this.__isConnected = true;


Loading…
Cancel
Save