Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

500 sometimes when pushing #2

@ty0002

Description

@ty0002

Sometimes when running this example across 2 separate browser sessions, the clients start to get a 500 when pushing to the sync server and they fall out of sync. The error log I get from the node server is...

    POST /_lowla/push 500 44ms
    GET /_lowla/changes?seq=20 200 3ms - 26b
    Error: Can't set headers after they are sent.
        at ServerResponse.OutgoingMessage.setHeader (http.js:707:11)
        at ServerResponse.res.set.res.header (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/response.js:549:10)
        at ServerResponse.res.contentType.res.type (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/response.js:419:15)
        at ServerResponse.res.send (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/response.js:111:43)
        at fn (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/response.js:798:10)
        at View.exports.renderFile [as engine] (/Users/stephenfortune/Documents/lowladb-node/node_modules/jade/lib/jade.js:294:12)
        at View.render (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/view.js:76:8)
        at Function.app.render (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/application.js:503:10)
        at ServerResponse.res.render (/Users/stephenfortune/Documents/lowladb-node/node_modules/express/lib/response.js:802:7)
        at Layer.module.exports [as handle] (/Users/stephenfortune/Documents/lowladb-node/app.js:81:9)

This happens when I create lots of todos quickly one after the other. Here's a few screen shots

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