summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gliderlabs/ssh/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gliderlabs/ssh/context.go')
-rw-r--r--vendor/github.com/gliderlabs/ssh/context.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/gliderlabs/ssh/context.go b/vendor/github.com/gliderlabs/ssh/context.go
index 2f61a40d61..505a43dbf3 100644
--- a/vendor/github.com/gliderlabs/ssh/context.go
+++ b/vendor/github.com/gliderlabs/ssh/context.go
@@ -140,7 +140,10 @@ func (ctx *sshContext) ServerVersion() string {
}
func (ctx *sshContext) RemoteAddr() net.Addr {
- return ctx.Value(ContextKeyRemoteAddr).(net.Addr)
+ if addr, ok := ctx.Value(ContextKeyRemoteAddr).(net.Addr); ok {
+ return addr
+ }
+ return nil
}
func (ctx *sshContext) LocalAddr() net.Addr {