Skip to content

Close telnet connections which do not log in promptly #360

@cpcallen

Description

@cpcallen

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.

Metadata

Metadata

Assignees

Labels

coreThings related to the "core" part of the databaseenhancementFeature requests, major new features, etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions