mirror of https://github.com/embarklabs/embark.git
fix(@embark/whisper): show message when geth port is already taken
This commit is contained in:
parent
dba5f771f2
commit
23f9a8c49c
|
@ -222,7 +222,7 @@ Blockchain.prototype.run = function () {
|
|||
// TOCHECK I don't understand why stderr and stdout are reverted.
|
||||
// This happens with Geth and Parity, so it does not seems a client problem
|
||||
self.child.stdout.on('data', (data) => {
|
||||
self.logger.info(`${self.client.name} error: ${data}`);
|
||||
self.logger.error(`${self.client.name} error: ${data}`);
|
||||
});
|
||||
|
||||
self.child.stderr.on('data', async (data) => {
|
||||
|
|
|
@ -169,7 +169,7 @@ class WhisperGethClient {
|
|||
if (config.wsRPC) {
|
||||
cmd.push("--ws");
|
||||
|
||||
cmd.push(`--wsport=${communicationConfig.connection.port || config.wsPost++}`);
|
||||
cmd.push(`--wsport=${communicationConfig.connection.port || config.wsPort++}`);
|
||||
cmd.push(`--wsaddr=${communicationConfig.connection.host || config.wsHost++}`);
|
||||
|
||||
if (config.wsOrigins) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { __ } from 'embark-i18n';
|
||||
import {dappPath, canonicalHost, defaultHost} from 'embark-utils';
|
||||
const constants = require('embark-core/constants');
|
||||
import {canonicalHost, defaultHost} from 'embark-utils';
|
||||
const API = require('./api.js');
|
||||
|
||||
class Whisper {
|
||||
|
@ -11,8 +10,6 @@ class Whisper {
|
|||
this.communicationConfig = embark.config.communicationConfig;
|
||||
this.embarkConfig = embark.config.embarkConfig;
|
||||
this.embark = embark;
|
||||
this.webSocketsChannels = {};
|
||||
this.modulesPath = dappPath(embark.config.embarkConfig.generationDir, constants.dappArtifacts.symlinkDir);
|
||||
|
||||
this.api = new API(embark);
|
||||
this.whisperNodes = {};
|
||||
|
@ -42,7 +39,7 @@ class Whisper {
|
|||
let connection = this.communicationConfig.connection || {};
|
||||
const config = {
|
||||
server: canonicalHost(connection.host || defaultHost),
|
||||
port: connection.port || '8546',
|
||||
port: connection.port || '8557',
|
||||
type: connection.type || 'ws'
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue