google / google/CodeCity

Close telnet connections which do not log in promptly

Aperta
#360 3 commenti 0 reazioni 1 assegnatario Rivendicata da @cpcallen Vedi su GitHub
core enhancement
Lingua principale
JavaScript
Stelle
198
Fork
38
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When an inbound telnet connection is made, a timer should be started and the connection closed if no successful login has occurred within some (probably small) amount of time.

Background:

We ended up with a whole bunch of connection objects in `$.servers.telnet.connected`. Looking at their `.buffer` property, I could see that something had connected to port 7777 and spammed some random binary data, but without a newline character to trigger a call to `.onReceiveLine`. This had apparently happened ca. 1400 times.

I did an eval to call .close on these connection objects; ~700 of them were apparently still attached to open connections, and calling .close caused them to be closed and then removed from the `.connected` list by their .onClose handler. The other ~700 had `.connected` set to true but were apparently not actually connected to anything so calling `.close` did not result in their `.onClose` being called. I set their `.open = false` manually, causing them to be cleared from the list the next time an actual connection dropped.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.