Handle lack of command in odd state

This commit is contained in:
Bryan Ashby 2017-08-19 13:59:09 -06:00
parent c7ff033737
commit c63a32a9ba
1 changed files with 5 additions and 0 deletions

View File

@ -544,6 +544,11 @@ util.inherits(TelnetClient, baseClient.Client);
// Telnet Command/Option handling
///////////////////////////////////////////////////////////////////////////////
TelnetClient.prototype.handleTelnetEvent = function(evt) {
if(!evt.command) {
return this.connectionWarn( { evt : evt }, 'No command for event');
}
// handler name e.g. 'handleWontCommand'
const handlerName = `handle${evt.command.charAt(0).toUpperCase()}${evt.command.substr(1)}Command`;