As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 9124bff4 authored by Archish's avatar Archish
Browse files

Added inspecting result in connection

parent a868e483
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -168,7 +168,15 @@ func (c *connection) sendKeepAliveMsg(ctx context.Context, sconn *ssh.ServerConn
case <-ticker.C:
ctxlog.Debug("connection: sendKeepAliveMsg: send keepalive message to a client")
_, _, _ = sconn.SendRequest(KeepAliveMsg, true, nil)
status, result, err := sconn.SendRequest(KeepAliveMsg, true, nil)
if err != nil {
ctxlog.Errorf("Error occurred while sending request :%v", err)
return
}
if status {
ctxlog.Debugf("connection: sendKeepAliveMsg: response: %v", string(result))
}
}
}
}
Loading
Loading
Loading
Loading
@@ -78,7 +78,7 @@ func (f *fakeConn) SendRequest(name string, _ bool, _ []byte) (bool, []byte, err
f.sentRequestName = name
return true, nil, nil
return true, []byte("I am response"), nil
}
func setup(newChannel *fakeNewChannel) (*connection, chan ssh.NewChannel) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment