Skip to content

HTTP server never completes with the responseComplete callback #275

Description

@sean618

When using chunked responses the server never seems to do the final responseComplete callback. It looks like stage 10 of the server is never being called (which also means the server.connections is never adjusted back down).

I don't not entirely sure, but it seems like maybe the didReceive function in modSocket is getting called with a null pbuf (maybe because it's getting a TCP FIN from the client?). This causes the socket to get set to kPendingDisconnect | kPendingClose.

This kPendingClose overrides all other pending states which means the socket is closed without any callbacks (even the disconnect one). So stage 10 is never called.

(Based on an ESP32 build)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions