So I thought the wait_read_hook would have a default
implementation if I didn't overwrite it's function pointer,
so far I have added this:

static int cutelyst_wait_fd_read(int fd, int timeout) {
    qDebug() << Q_FUNC_INFO;
    QAbstractSocket *sock = new
QAbstractSocket(QAbstractSocket::TcpSocket, qApp);
    sock->setSocketDescriptor(fd);
    sock->waitForReadyRead(timeout)
    qDebug() << Q_FUNC_INFO << sock->bytesAvailable();
    return sock->bytesAvailable();
}

and it works, however this is far from optimal.

Is the fd always an TcpSocket?
Since the fd is always the same (at least here),
wouldn't be better to use the socket notifier
on the req->fd?

Thanks

2014-07-10 13:34 GMT-03:00 Daniel Nicoletti <[email protected]>:
> Hi,
> I'm trying to include the Qt event loop you wrote,
> but I get a crash as soon as:
>
>  int ret = uwsgi.wait_read_hook(wsgi_req->fd, uwsgi.socket_timeout);
>
> is called.
>
> When I attach gdb to it the process get stuck and
> I can't get a decent backtrace, do you have an idea
> of what can be wrong or how to get a proper bt?
>
> Best,
>
> --
> Daniel Nicoletti
>
> KDE Developer - http://dantti.wordpress.com



-- 
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to