Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1021 from LiskHQ/1010-remove_local_def_of_sc_serv…
Browse files Browse the repository at this point in the history
…er_for_close

Remove local definition of socketcluster-server for close() method - Closes#1010
  • Loading branch information
shuse2 authored Jan 21, 2019
2 parents 72ed705 + 2752bf4 commit 42df8af
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/lisk-p2p/src/p2p.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ import {
P2PResponsePacket,
} from './p2p_types';

type SCServerCloseCallback = () => void;

type SCServerUpdated = {
readonly close: (sCServerCloseCallback: SCServerCloseCallback) => void;
} & SCServer;

import { PeerPool } from './peer_pool';

export const EVENT_NEW_INBOUND_PEER = 'newInboundPeer';
Expand All @@ -57,7 +51,7 @@ export class P2P extends EventEmitter {

private _nodeInfo: P2PNodeInfo;
private readonly _peerPool: PeerPool;
private readonly _scServer: SCServerUpdated;
private readonly _scServer: SCServer;

public constructor(config: P2PConfig) {
super();
Expand All @@ -74,7 +68,7 @@ export class P2P extends EventEmitter {

this._peerPool = new PeerPool();
this._httpServer = http.createServer();
this._scServer = attach(this._httpServer) as SCServerUpdated;
this._scServer = attach(this._httpServer);
}

public get isActive(): boolean {
Expand Down

0 comments on commit 42df8af

Please sign in to comment.