in src/sessionmanagerplugin/session/session.go [221:248]
func (s *Session) Execute(log log.T) (err error) {
fmt.Fprintf(os.Stdout, "\nStarting session with SessionId: %s\n", s.SessionId)
// sets the display mode
s.DisplayMode = sessionutil.NewDisplayMode(log)
if err = s.OpenDataChannel(log); err != nil {
log.Errorf("Error in Opening data channel: %v", err)
return
}
handleStreamMessageResendTimeout(s, log)
// The session type is set either by handshake or the first packet received.
if !<-s.DataChannel.IsSessionTypeSet() {
log.Errorf("unable to set SessionType for session %s", s.SessionId)
return errors.New("unable to determine SessionType")
} else {
s.SessionType = s.DataChannel.GetSessionType()
s.SessionProperties = s.DataChannel.GetSessionProperties()
if err = setSessionHandlersWithSessionType(s, log); err != nil {
log.Errorf("Session ending with error: %v", err)
return
}
}
return
}