func (p *party) termSizePusher(ch ssh.Channel) {
	var (
		err error
		n   int
	)
	defer func() {
		if err != nil {
			log.Error(err)
		}
	}()

	for err == nil {
		select {
		case newSize := <-p.termSizeC:
			n, err = ch.Write(newSize)
			if err == io.EOF {
				continue
			}
			if err != nil || n == 0 {
				return
			}
		case <-p.closeC:
			return
		}
	}
}
// This goroutine pushes terminal resize events directly into a connected web client
This goroutine pushes terminal resize events directly into a connected web client
// This goroutine pushes terminal resize events directly into a connected web client
func (p *party) termSizePusher(ch ssh.Channel) {
	var (
		err error
		n   int
	)
	defer func() {
		if err != nil {
			log.Error(err)
		}
	}()
	for err == nil {
		select {
		case newSize := <-p.termSizeC:
			n, err = ch.Write(newSize)
			if err == io.EOF {
				continue
			}
			if err != nil || n == 0 {
				return
			}
		case <-p.closeC:
			return
		}
	}
}
func ( p * party ) termSizePusher ( ch ssh . Channel ) { var ( err error n int ) defer func ( ) { if err != nil { log . Error ( err ) } } ( ) for err == nil { select { case newSize := <- p . termSizeC : n , err = ch . Write ( newSize ) if err == io . EOF { continue } if err != nil || n == 0 { return } case <- p . closeC : return } } }
This goroutine pushes terminal resize events directly into a connected web client
This goroutine pushes terminal resize events directly into a connected web client