DrivenEngine channels are now shared_ptr
This commit is contained in:
@@ -169,14 +169,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void handle_new_closed_sockets() {
|
||||
std::set<int> chans;
|
||||
driven_->drv_get_new_closed(chans);
|
||||
for (int chid : chans) {
|
||||
if (socket_[chid] != INVALID_SOCKET) {
|
||||
assert(close(socket_[chid]) == 0);
|
||||
socket_[chid] = INVALID_SOCKET;
|
||||
connected_[chid] = false;
|
||||
void handle_new_closed_sockets() {
|
||||
for (int chid = 1; chid < MAX_CHAN; chid++) {
|
||||
if (driven_->drv_get_channel_released(chid)) {
|
||||
if (socket_[chid] != INVALID_SOCKET) {
|
||||
assert(close(socket_[chid]) == 0);
|
||||
socket_[chid] = INVALID_SOCKET;
|
||||
connected_[chid] = false;
|
||||
}
|
||||
driven_->drv_notify_close(chid, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user