remotecommand: close resize channel for notification

Remotecommand package should notify executor by closing resizeChan.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2020-04-03 15:23:55 +08:00
parent b1766b707a
commit d2b59f10c5

View File

@ -411,6 +411,7 @@ func (*v1ProtocolHandler) supportsTerminalResizing() bool { return false }
func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalSize) {
defer runtime.HandleCrash()
defer close(channel)
decoder := json.NewDecoder(stream)
for {