|
|
@ -612,6 +612,7 @@ namespace tunnel |
|
|
|
for (auto it = pendingTunnels.begin (); it != pendingTunnels.end ();) |
|
|
|
for (auto it = pendingTunnels.begin (); it != pendingTunnels.end ();) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto tunnel = it->second; |
|
|
|
auto tunnel = it->second; |
|
|
|
|
|
|
|
auto pool = tunnel->GetTunnelPool(); |
|
|
|
switch (tunnel->GetState ()) |
|
|
|
switch (tunnel->GetState ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case eTunnelStatePending: |
|
|
|
case eTunnelStatePending: |
|
|
@ -637,6 +638,8 @@ namespace tunnel |
|
|
|
#ifdef WITH_EVENTS |
|
|
|
#ifdef WITH_EVENTS |
|
|
|
EmitTunnelEvent("tunnel.state", tunnel.get(), eTunnelStateBuildFailed); |
|
|
|
EmitTunnelEvent("tunnel.state", tunnel.get(), eTunnelStateBuildFailed); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// for i2lua
|
|
|
|
|
|
|
|
if(pool) pool->OnTunnelBuildResult(tunnel, eBuildResultTimeout); |
|
|
|
// delete
|
|
|
|
// delete
|
|
|
|
it = pendingTunnels.erase (it); |
|
|
|
it = pendingTunnels.erase (it); |
|
|
|
m_NumFailedTunnelCreations++; |
|
|
|
m_NumFailedTunnelCreations++; |
|
|
@ -649,6 +652,9 @@ namespace tunnel |
|
|
|
#ifdef WITH_EVENTS |
|
|
|
#ifdef WITH_EVENTS |
|
|
|
EmitTunnelEvent("tunnel.state", tunnel.get(), eTunnelStateBuildFailed); |
|
|
|
EmitTunnelEvent("tunnel.state", tunnel.get(), eTunnelStateBuildFailed); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// for i2lua
|
|
|
|
|
|
|
|
if(pool) pool->OnTunnelBuildResult(tunnel, eBuildResultRejected); |
|
|
|
|
|
|
|
|
|
|
|
it = pendingTunnels.erase (it); |
|
|
|
it = pendingTunnels.erase (it); |
|
|
|
m_NumFailedTunnelCreations++; |
|
|
|
m_NumFailedTunnelCreations++; |
|
|
|
break; |
|
|
|
break; |
|
|
|