|
|
|
@ -43,6 +43,10 @@ TR_commManagerAddEndpoint(void * _this, TR_CommEndPoint endpoint) |
|
|
|
TR_delete(this->endpoints[endpoint->transport->handle]); |
|
|
|
} |
|
|
|
|
|
|
|
this->max_handle = endpoint->transport->handle > this->max_handle |
|
|
|
? endpoint->transport->handle |
|
|
|
: this->max_handle; |
|
|
|
|
|
|
|
this->endpoints[endpoint->transport->handle] = endpoint; |
|
|
|
TR_CALL(_this, TR_CommManager, addEndpoint, endpoint); |
|
|
|
} |
|
|
|
@ -102,6 +106,10 @@ TR_commManagerClose(void * _this, TR_Event event) |
|
|
|
|
|
|
|
TR_socketShutdown(endpoint->transport); |
|
|
|
TR_CALL(_this, TR_CommManager, close, event); |
|
|
|
|
|
|
|
if (endpoint->transport->handle == this->max_handle) { |
|
|
|
while (! this->endpoints[--this->max_handle]); |
|
|
|
} |
|
|
|
TR_delete(this->endpoints[endpoint->transport->handle]); |
|
|
|
|
|
|
|
return TR_EVENT_DONE; |
|
|
|
|