Closed dominikzogg closed 2 years ago
Who knows what your code is doing. You are asking to debug your code which spans multiple repositories, what is streamFromResourceFactory doing? Do you know how to do basic testing?
Hi @e3dio
https://github.com/chubbyts/chubbyts-http/blob/master/src/message-factory.ts#L40 But the code behaves the same without calling it.
I guessed it's a known issues in using the library, thats why i ask. Using the default node server with the same code (except the code in uwebsocket).
The stream created (by me, based on res.onData) won't receive any data or get to an end in the first request after the start.
const readStream = async (stream) => {
return new Promise((resolve, reject) => {
let data = '';
stream.on('data', (chunk) => { data += chunk; console.log(data); });
stream.on('end', () => resolve(data));
stream.on('error', (error) => reject(error));
});
};
I work on a implementation to run my typescript web framework with uwebsockets. Without one expection its running great so far. After started the server a request without a request body (res.onData) works well. After started the server a request with a request body (res.onData) takes forever. If the second call got a request body i got no issue at all.
I have no idea if i do something wrong.
https://github.com/chubbyts/chubbyts-uwebsockets-http-bridge/blob/master/src/uwebsocket-http.ts#L66