Fixes #3285. Checks for nil for session.peerhost and session.tunnel_peer -- hard to test, though, since I can't tell what originally causes the issue -- with and without this fix I get idential results on a normal ssh session. But, with the nil check in place, it should clear up the stack trace listed.
git-svn-id: file:///home/svn/framework3/trunk@11203 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
9e03e8a142
commit
fed550d7e7
|
@ -319,11 +319,11 @@ class FrameworkEventSubscriber
|
|||
if framework.db.active
|
||||
framework.db.sync
|
||||
# Copy/paste ftw
|
||||
if session.respond_to? :peerhost
|
||||
if session.respond_to? :peerhost and session.peerhot
|
||||
address = session.peerhost
|
||||
elsif session.respond_to? :tunnel_peer
|
||||
elsif session.respond_to? :tunnel_peer and session.tunnel_peer
|
||||
address = session.tunnel_peer[0, session.tunnel_peer.rindex(":") || session.tunnel_peer.length ]
|
||||
elsif session.respond_to? :target_host
|
||||
elsif session.respond_to? :target_host and session.target_host
|
||||
address = session.target_host
|
||||
else
|
||||
elog("Session with no peerhost/tunnel_peer")
|
||||
|
|
Loading…
Reference in New Issue