fix compile error
This commit is contained in:
parent
302476f481
commit
3b7d2614ed
14
gost/ssh.go
14
gost/ssh.go
@ -10,7 +10,6 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"weed-fs/go/glog"
|
|
||||||
|
|
||||||
"github.com/go-log/log"
|
"github.com/go-log/log"
|
||||||
"golang.org/x/crypto/ssh"
|
"golang.org/x/crypto/ssh"
|
||||||
@ -253,17 +252,17 @@ func (s *sshSession) Ping(interval time.Duration, retries int) {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-t.C:
|
case <-t.C:
|
||||||
if Debug {
|
//if Debug {
|
||||||
log.Log("[ssh] sending ping")
|
log.Log("[ssh] sending ping")
|
||||||
}
|
//}
|
||||||
_, _, err := s.client.SendRequest("ping", true, nil)
|
_, _, err := s.client.SendRequest("ping", true, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Log("[ssh] ping:", err)
|
log.Log("[ssh] ping:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if Debug {
|
//if Debug {
|
||||||
log.Log("[ssh] ping OK")
|
log.Log("[ssh] ping OK")
|
||||||
}
|
//}
|
||||||
|
|
||||||
case <-s.closed:
|
case <-s.closed:
|
||||||
return
|
return
|
||||||
@ -459,7 +458,6 @@ func (h *sshForwardHandler) tcpipForwardRequest(sshConn ssh.Conn, req *ssh.Reque
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.Port2 = uint32(portnum)
|
p.Port2 = uint32(portnum)
|
||||||
glog.V(3).Info(p)
|
|
||||||
ch, reqs, err := sshConn.OpenChannel(ForwardedTCPReturnRequest, ssh.Marshal(p))
|
ch, reqs, err := sshConn.OpenChannel(ForwardedTCPReturnRequest, ssh.Marshal(p))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Log("[ssh-rtcp] open forwarded channel:", err)
|
log.Log("[ssh-rtcp] open forwarded channel:", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user