- Timestamp:
- Jan 11, 2022 9:28:09 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/EventImpl.cpp
r93115 r93188 229 229 { 230 230 *aResult = FALSE; 231 /* 232 * If we timed out then one or more passive listeners didn't process this event 233 * within the time limit most likely due to the listener no longer being alive (e.g. 234 * the VirtualBox GUI crashed) so we flag this to our caller so it can remove this 235 * event from the list of events the passive listener is interested in. This avoids 236 * incurring this timeout every time the event is fired. 237 */ 238 if (vrc == VERR_TIMEOUT) 239 return E_ABORT; 231 240 } 232 241 … … 1176 1185 1177 1186 if (fWaitable) 1187 { 1178 1188 hrc = aEvent->WaitProcessed(aTimeout, aResult); 1189 1190 /* 1191 * If a passive listener times out without processing a vetoable event then we 1192 * remove that event from the list of events this listener is interested in. 1193 */ 1194 if (!*aResult && hrc == E_ABORT && implies(VBoxEventType_Vetoable, evType)) 1195 { 1196 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1197 1198 EventMapList &listeners = m->mEvMap[(int)evType - FirstEvent]; 1199 for (EventMapList::iterator it = listeners.begin(); 1200 it != listeners.end(); 1201 ++it) 1202 { 1203 RecordHolder<ListenerRecord> record(*it); 1204 if (record.obj()->mQueue.size() != 0 && record.obj()->mQueue.back() == aEvent) 1205 m->mEvMap[(int)evType - FirstEvent].remove(record.obj()); 1206 } 1207 1208 PendingEventsMap::iterator pit = m->mPendingMap.find(aEvent); 1209 if (pit != m->mPendingMap.end()) 1210 m->mPendingMap.erase(pit); 1211 1212 /* 1213 * VBoxEventDesc::fire() requires TRUE to be returned so it can handle 1214 * vetoable events. 1215 */ 1216 return S_OK; 1217 } 1218 } 1179 1219 else 1180 1220 *aResult = TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.