mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
Fix port in use message
This commit is contained in:
parent
4244f2bc69
commit
26c435c829
@ -81,12 +81,13 @@ class WebServerService extends BaseService {
|
|||||||
server.on('error', e => {
|
server.on('error', e => {
|
||||||
if ( e.code === 'EADDRINUSE' ) {
|
if ( e.code === 'EADDRINUSE' ) {
|
||||||
if ( ! is_last_port && e.code === 'EADDRINUSE' ) {
|
if ( ! is_last_port && e.code === 'EADDRINUSE' ) {
|
||||||
this.log.info('port in use:', port);
|
this.log.info('port in use: ' + port);
|
||||||
should_continue = true;
|
should_continue = true;
|
||||||
}
|
}
|
||||||
|
rslv();
|
||||||
|
} else {
|
||||||
rjct(e);
|
rjct(e);
|
||||||
}
|
}
|
||||||
rslv();
|
|
||||||
});
|
});
|
||||||
server.on('listening', () => {
|
server.on('listening', () => {
|
||||||
rslv();
|
rslv();
|
||||||
@ -95,7 +96,7 @@ class WebServerService extends BaseService {
|
|||||||
if ( should_continue ) continue;
|
if ( should_continue ) continue;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if ( ! is_last_port && e.code === 'EADDRINUSE' ) {
|
if ( ! is_last_port && e.code === 'EADDRINUSE' ) {
|
||||||
this.log.info('port in use:', port);
|
this.log.info('port in use:' + port);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
|
Loading…
Reference in New Issue
Block a user