Refactor self-connection handling and improve message processing
- Removed self-connection detection logic from the Listener and Server, simplifying the message handling process. - Updated the HandleMessage and handle-websocket functions to eliminate checks for self-connections, enhancing clarity and maintainability. - Adjusted AUTH challenge logic to focus solely on blacklisted IPs, streamlining connection management.
This commit is contained in:
@@ -24,7 +24,6 @@ type Listener struct {
|
||||
challenge atomic.Bytes
|
||||
authedPubkey atomic.Bytes
|
||||
startTime time.Time
|
||||
isSelfConnection bool // Marker to identify self-connections
|
||||
isBlacklisted bool // Marker to identify blacklisted IPs
|
||||
blacklistTimeout time.Time // When to timeout blacklisted connections
|
||||
// Diagnostics: per-connection counters
|
||||
|
||||
Reference in New Issue
Block a user