Handle keep alive in signal server

This commit is contained in:
Zoltan Papp
2023-03-30 14:31:52 +02:00
parent a6431e053b
commit 551455f314
5 changed files with 25 additions and 11 deletions

View File

@@ -11,8 +11,9 @@ import (
)
const (
GrpcVersionHeaderKey = "version"
reversProxyHeaderKey = "x-netbird-peer"
grpcVersionHeaderKey = "version"
keepAliveInterval = 30 * time.Second
)
@@ -112,7 +113,7 @@ func (k *KeepAlive) keepAliveIsSupported(ctx context.Context) (string, bool) {
return "", false
}
if len(md.Get(grpcVersionHeaderKey)) == 0 {
if len(md.Get(GrpcVersionHeaderKey)) == 0 {
log.Debugf("version info not found")
return "", false
}