mirror of
https://github.com/kvazar-network/keva-stratum.git
synced 2025-03-12 05:51:05 +00:00
Remove session on disconnect
This commit is contained in:
parent
7ac236a393
commit
5d795dc56d
@ -186,10 +186,10 @@ func (s *StratumServer) handleClient(cs *Session, e *Endpoint) error {
|
||||
data, isPrefix, err := connbuff.ReadLine()
|
||||
if isPrefix {
|
||||
log.Printf("Socket flood detected")
|
||||
// TODO: Ban client
|
||||
return errors.New("Socket flood")
|
||||
} else if err == io.EOF {
|
||||
log.Printf("Client disconnected")
|
||||
log.Println("Client disconnected", cs.ip)
|
||||
s.removeSession(cs)
|
||||
break
|
||||
} else if err != nil {
|
||||
log.Printf("Error reading: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user