fix vpn notification, add more logs under debug flag
This commit is contained in:
1 parent
d66be97922
commit
2dbc6ea1eb
17 files changed
+90
-27
No files matched your search
@@ -13,6 +13,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"whitelist-bypass/relay/common"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -549,11 +551,15 @@ func (c *SignalingClient) ReadLoop() error {
|
||||
}
|
||||
var frame Frame
|
||||
if err := json.Unmarshal(raw, &frame); err != nil {
|
||||
c.logFn("dion: drop non-json frame: %v", err)
|
||||
if common.Debug {
|
||||
c.logFn("dion: drop non-json frame: %v", err)
|
||||
}
|
||||
continue
|
||||
}
|
||||
if frame.Error != nil {
|
||||
c.logFn("dion: <- %s ERROR code=%d message=%q", frame.Method, frame.Error.Code, frame.Error.Message)
|
||||
if common.Debug {
|
||||
c.logFn("dion: <- %s ERROR code=%d message=%q", frame.Method, frame.Error.Code, frame.Error.Message)
|
||||
}
|
||||
}
|
||||
c.dispatch(frame)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user