mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
suppress the error message after it has shown once
This commit is contained in:
parent
53d3ad04b7
commit
6e704f74e3
@ -14,7 +14,6 @@ import (
|
|||||||
"github.com/wavetermdev/thenextwave/pkg/wshrpc"
|
"github.com/wavetermdev/thenextwave/pkg/wshrpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var viewNewBlock bool
|
|
||||||
var viewMagnified bool
|
var viewMagnified bool
|
||||||
|
|
||||||
var viewCmd = &cobra.Command{
|
var viewCmd = &cobra.Command{
|
||||||
@ -26,7 +25,6 @@ var viewCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
viewCmd.Flags().BoolVarP(&viewNewBlock, "newblock", "n", false, "open view in a new block")
|
|
||||||
viewCmd.Flags().BoolVarP(&viewMagnified, "magnified", "m", false, "open view in magnified mode")
|
viewCmd.Flags().BoolVarP(&viewMagnified, "magnified", "m", false, "open view in magnified mode")
|
||||||
rootCmd.AddCommand(viewCmd)
|
rootCmd.AddCommand(viewCmd)
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,8 @@ function sendRawRpcMessage(msg: RpcMessage) {
|
|||||||
globalWS.pushMessage(wsMsg);
|
globalWS.pushMessage(wsMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const notFoundLogMap = new Map<string, boolean>();
|
||||||
|
|
||||||
function handleIncomingRpcMessage(msg: RpcMessage, eventHandlerFn: (event: WaveEvent) => void) {
|
function handleIncomingRpcMessage(msg: RpcMessage, eventHandlerFn: (event: WaveEvent) => void) {
|
||||||
const isRequest = msg.command != null || msg.reqid != null;
|
const isRequest = msg.command != null || msg.reqid != null;
|
||||||
if (isRequest) {
|
if (isRequest) {
|
||||||
@ -111,7 +113,10 @@ function handleIncomingRpcMessage(msg: RpcMessage, eventHandlerFn: (event: WaveE
|
|||||||
}
|
}
|
||||||
const entry = openRpcs.get(msg.resid);
|
const entry = openRpcs.get(msg.resid);
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
console.log("rpc response generator not found", msg);
|
if (!notFoundLogMap.has(msg.resid)) {
|
||||||
|
notFoundLogMap.set(msg.resid, true);
|
||||||
|
console.log("rpc response generator not found", msg);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entry.msgFn(msg);
|
entry.msgFn(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user