File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 2.5.1] - 2019-05-22
5+ - Add support for "clientTimeout" messages from the server
6+
47## [ 2.5.0] - 2019-05-21
58- Add WebSocket API improvements
69- Add support for "stats.pendingTxs"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default class Logger {
3939 }
4040
4141 if ( processExit ) {
42- process . exit ( ) ;
42+ process . exit ( ( type === 'error' ? 1 : 0 ) ) ;
4343 }
4444 }
4545
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export default class Server {
153153 this . socket . on ( 'end' , ( ) => {
154154 this . isLoggedIn = false ;
155155 this . socketIsOpen = false ;
156- this . log . warning ( 'Connection ended with ethstats server' ) ;
156+ this . log . error ( 'Connection ended with ethstats server' , false , true ) ;
157157 } ) ;
158158
159159 this . socket . on ( 'reconnect failed' , ( ) => {
@@ -167,6 +167,9 @@ export default class Server {
167167 case 'invalidMessage' :
168168 this . resolveResponse ( message . topic , message . payload ) ;
169169 break ;
170+ case 'clientTimeout' :
171+ this . resolveResponse ( message . topic , message . payload ) ;
172+ break ;
170173 case 'requestRateLimitReached' :
171174 this . resolveResponse ( message . topic , message . payload ) ;
172175 break ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import moment from 'moment';
55
66if ( config . configStore . get ( 'firstRun' ) !== false ) {
77 console . log ( 'Your node is not registered. Please run "ethstats-cli" first.' ) ;
8- process . exit ( ) ;
8+ process . exit ( 1 ) ;
99}
1010
1111const daemonOption = process . argv [ 2 ] ;
@@ -27,7 +27,7 @@ if (!daemonAvailableOptions.includes(daemonOption)) {
2727
2828 If any CLI options are specified after the Daemon option, they will be forwarded to the forked process.
2929` ) ;
30- process . exit ( ) ;
30+ process . exit ( 1 ) ;
3131}
3232
3333if ( ! process . argv . includes ( '-v' ) ) {
@@ -48,7 +48,7 @@ const processOptions = {
4848pm2 . connect ( err => {
4949 if ( err ) {
5050 console . error ( err ) ;
51- process . exit ( 2 ) ;
51+ process . exit ( 1 ) ;
5252 }
5353
5454 if ( daemonOption === 'start' ) {
@@ -95,7 +95,7 @@ pm2.connect(err => {
9595 pm2 . killDaemon ( error => {
9696 console . log ( `Ethstats daemon KILL ${ ( error ) ? chalk . red ( `[FAILED] ${ error . message } ` ) : chalk . green ( '[OK]' ) } ` ) ;
9797 pm2 . disconnect ( ) ;
98- process . exit ( ) ;
98+ process . exit ( ( error ) ? 1 : 0 ) ;
9999 } ) ;
100100 }
101101} ) ;
You can’t perform that action at this time.
0 commit comments