minor fix - removed errors

This commit is contained in:
crn4 2025-06-17 17:53:44 +02:00
parent 05733b00c1
commit 0a9d09267a
2 changed files with 1 additions and 4 deletions

View File

@ -2,7 +2,6 @@ package server
import (
"context"
"errors"
"fmt"
"net"
"net/netip"
@ -339,9 +338,6 @@ func mapError(ctx context.Context, err error) error {
default:
}
}
if errors.Is(err, internalStatus.ErrPeerAlreadyLoggedIn) {
return status.Error(codes.PermissionDenied, internalStatus.ErrPeerAlreadyLoggedIn.Error())
}
log.WithContext(ctx).Errorf("got an unhandled error: %s", err)
return status.Errorf(codes.Internal, "failed handling request")
}

View File

@ -47,6 +47,7 @@ func (l *loginFilter) addLogin(wgPubKey, metaHash string) {
}
mh.hashes[metaHash] = struct{}{}
mh.counter++
l.logged[wgPubKey] = mh
if mh.counter > loggingLimit && len(mh.hashes) > 1 {
log.WithFields(log.Fields{
"wgPubKey": wgPubKey,