forked from cory/tildefriends
Try to respond to tunnel errors I'm seeing instead of forwarding them over the tunnel, which obviously won't work. Allow creating multiple connections to the same ID if it's for the sake of a tunnel. I think this explains timeouts I'm seeing with tunnels. More error handling, too. C'mon, fix tunnels.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4409 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -322,7 +322,7 @@ static void _tf_ssb_rpc_tunnel_connect(tf_ssb_connection_t* connection, uint8_t
|
||||
JSValue target = JS_GetPropertyStr(context, arg, "target");
|
||||
|
||||
if (JS_IsUndefined(origin) &&
|
||||
!JS_IsUndefined(portal) &&
|
||||
!JS_IsUndefined(portal) &&
|
||||
!JS_IsUndefined(target))
|
||||
{
|
||||
const char* target_str = JS_ToCString(context, target);
|
||||
@ -376,10 +376,14 @@ static void _tf_ssb_rpc_tunnel_connect(tf_ssb_connection_t* connection, uint8_t
|
||||
JS_FreeValue(context, message);
|
||||
JS_FreeCString(context, portal_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
tf_ssb_connection_rpc_send_error(connection, flags, -request_number, "Connection not found.");
|
||||
}
|
||||
JS_FreeCString(context, target_str);
|
||||
}
|
||||
else if (!JS_IsUndefined(origin) &&
|
||||
!JS_IsUndefined(portal) &&
|
||||
!JS_IsUndefined(portal) &&
|
||||
!JS_IsUndefined(target))
|
||||
{
|
||||
const char* origin_str = JS_ToCString(context, origin);
|
||||
|
Reference in New Issue
Block a user