Adapting Changelog and fixing Warn element
This commit is contained in:
parent
b2d3d19ad8
commit
cfc26f627b
@ -1,3 +1,7 @@
|
||||
# 0.9.7.2
|
||||
|
||||
- Add a parameter for the `runNopeBackend` to select the default service provider selection method.
|
||||
|
||||
# 0.9.7.1
|
||||
|
||||
- If the Channel "event" is selected the "force-emitting" is enabled
|
||||
|
@ -269,6 +269,8 @@ export class nopeDispatcher implements INopeDispatcher {
|
||||
remove: number;
|
||||
};
|
||||
|
||||
private __warned: boolean;
|
||||
|
||||
/**
|
||||
* Creates an instance of nopeDispatcher.
|
||||
* @param {nopeRpcDispatcherOptions} options The Options, used by the Dispatcher.
|
||||
@ -303,6 +305,8 @@ export class nopeDispatcher implements INopeDispatcher {
|
||||
};
|
||||
}
|
||||
|
||||
this.__warned = false;
|
||||
|
||||
if (RUNNINGINNODE) {
|
||||
const os = require("os");
|
||||
|
||||
@ -2479,8 +2483,9 @@ export class nopeDispatcher implements INopeDispatcher {
|
||||
|
||||
let _func = func;
|
||||
|
||||
if (!isAsyncFunction(func)) {
|
||||
throw Error("Only Async Functions are allowed");
|
||||
if (!this.__warned && !isAsyncFunction(func)) {
|
||||
this._logger.warn("!!! You have provided synchronous functions. They may break NoPE. Use them with care !!!");
|
||||
this.__warned = true;
|
||||
}
|
||||
|
||||
if (options.deleteAfterCalling) {
|
||||
|
Loading…
Reference in New Issue
Block a user