~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/golang.org/x/crypto/ssh/channel.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        // boolean, otherwise the return value will be false. Channel
68
68
        // requests are out-of-band messages so they may be sent even
69
69
        // if the data stream is closed or blocked by flow control.
 
70
        // If the channel is closed before a reply is returned, io.EOF
 
71
        // is returned.
70
72
        SendRequest(name string, wantReply bool, payload []byte) (bool, error)
71
73
 
72
74
        // Stderr returns an io.ReadWriter that writes to this channel
217
219
 
218
220
func (c *channel) sendMessage(msg interface{}) error {
219
221
        if debugMux {
220
 
                log.Printf("send %d: %#v", c.mux.chanList.offset, msg)
 
222
                log.Printf("send(%d): %#v", c.mux.chanList.offset, msg)
221
223
        }
222
224
 
223
225
        p := Marshal(msg)
371
373
        close(c.msg)
372
374
        close(c.incomingRequests)
373
375
        c.writeMu.Lock()
374
 
        // This is not necesary for a normal channel teardown, but if
 
376
        // This is not necessary for a normal channel teardown, but if
375
377
        // there was another error, it is.
376
378
        c.sentClose = true
377
379
        c.writeMu.Unlock()