Land #9492, fix for reverse port forwards

4.x
scriptjunkie 2018-02-02 21:58:41 -06:00 committed by Jeffrey Martin
parent 49c9b3cf1e
commit 64c0d60fbf
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 4 additions and 1 deletions

View File

@ -45,11 +45,14 @@ class Pivot
# Class request handler for all channels that dispatches requests
# to the appropriate class instance's DIO handler
def request_handler(client, packet)
handled = false
if packet.method == 'core_pivot_session_new'
handled = true
session_guid = packet.get_tlv_value(TLV_TYPE_SESSION_GUID)
listener_id = packet.get_tlv_value(TLV_TYPE_PIVOT_ID)
client.add_pivot_session(Pivot.new(client, session_guid, listener_id))
elsif packet.method == 'core_pivot_session_died'
handled = true
session_guid = packet.get_tlv_value(TLV_TYPE_SESSION_GUID)
pivot = client.find_pivot_session(session_guid)
if pivot
@ -57,7 +60,7 @@ class Pivot
client.remove_pivot_session(session_guid)
end
end
true
handled
end
end