File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
ui/console/command_dispatcher Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -558,7 +558,11 @@ def shutdown
558
558
# Indicates if the given transport is a valid transport option.
559
559
#
560
560
def valid_transport? ( transport )
561
- VALID_TRANSPORTS . has_key? ( transport . downcase )
561
+ if transport
562
+ VALID_TRANSPORTS . has_key? ( transport . downcase )
563
+ else
564
+ false
565
+ end
562
566
end
563
567
564
568
private
Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ def initialize_passive_dispatcher
79
79
80
80
def shutdown_passive_dispatcher
81
81
return if not self . passive_service
82
- self . passive_service . remove_resource ( self . conn_id + "/" )
82
+ resource = self . conn_id
83
+ resource += "/" unless resource . end_with? ( "/" )
84
+ self . passive_service . remove_resource ( resource )
83
85
84
86
# If there are no more resources registered on the service, stop it entirely
85
87
if self . passive_service . resources . empty?
Original file line number Diff line number Diff line change @@ -281,10 +281,6 @@ def cmd_detach_help
281
281
# Disconnects the session
282
282
#
283
283
def cmd_detach ( *args )
284
- if not client . passive_service
285
- print_error ( "Detach is only possible for non-stream sessions (http/https)" )
286
- return
287
- end
288
284
client . shutdown_passive_dispatcher
289
285
shell . stop
290
286
end
You can’t perform that action at this time.
0 commit comments