Giter Site home page Giter Site logo

Comments (5)

unbit avatar unbit commented on September 27, 2024

can you try if changing line 367 to 'return 0' fixes the issue ?

like this
// check instance
if (cs->instance_address_len == 0) {
// if fallback nodes are configured, trigger them
if (ucr->fallback) {
cs->instance_failed = 1;
}
return 0;
}

from uwsgi.

prymitive avatar prymitive commented on September 27, 2024

Yes it does, since You didn't mentioned what file should I modify I did a little grep to make sure and I've patched fastrouter.c and http.c, corerouter still runs old code

diff --git a/plugins/fastrouter/fastrouter.c b/plugins/fastrouter/fastrouter.c
index c462001..9e4f1e8 100644
--- a/plugins/fastrouter/fastrouter.c
+++ b/plugins/fastrouter/fastrouter.c
@@ -288,7 +288,7 @@ ssize_t fr_recv_uwsgi_vars(struct corerouter_session * cs) {
                        if (ucr->fallback) {
                                cs->instance_failed = 1;
                        }
-                       return -1;
+                       return 0;
                }

                // stop receiving from the client
diff --git a/plugins/http/http.c b/plugins/http/http.c
index 7869467..78c80ff 100644
--- a/plugins/http/http.c
+++ b/plugins/http/http.c
@@ -1000,7 +1000,7 @@ ssize_t hs_http_manage(struct corerouter_session * cs, ssize_t len) {
                                if (ucr->fallback) {
                                        cs->instance_failed = 1;
                                }
-                               return -1;
+                               return 0;
                        }

                        // stop receiving from the client

from uwsgi.

unbit avatar unbit commented on September 27, 2024

yes, it's ok, i will make a check on all of the areas where we need to suddenly close the connection.

from uwsgi.

unbit avatar unbit commented on September 27, 2024

i have preferred a more drastical approach, resetting errno before each hook invocation. Can you check if all is working as expected ?

from uwsgi.

prymitive avatar prymitive commented on September 27, 2024

Yes it does, thanks

from uwsgi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.