Commits

Anonymous committed 2ef6133

If an error occured in the callback, break the loop and reraise it in the frame where dispatch() was called

  • Participants
  • Parent commits af73d11

Comments (0)

Files changed (1)

libevent/eventmodule.c

 				    PyObject *kwargs) { 
 
     int rv = event_base_dispatch(self->ev_base);
+    if (PyErr_Occurred()) return NULL;
     return PyInt_FromLong(rv);
 
 }
        int r  = PyThreadState_SetAsyncExc(ts->thread_id, EventErrorObject);
        printf("%d\n", r);
       */
-      PyErr_WriteUnraisable(ev->callback);
+      event_base_loopexit(ev->eventBase->ev_base, NULL);
 
     }
 }