Skip to content

Conversation

daurnimator
Copy link
Owner

Possible major server API change.

  - on_stream is now passed into server constructor instead of being passed to :run.
  - server objects are now `cqueues.poll()`-able
  - `server:close()` closes connections due to `cq:reset()` forcing an early return of `get_next_incoming_stream`
@coveralls
Copy link

coveralls commented May 6, 2016

Coverage Status

Coverage decreased (-0.006%) to 86.736% when pulling 97937de on server-refactor into 2bef7a9 on master.

@daurnimator
Copy link
Owner Author

I'm not sure about merging this. I don't think it gains a lot, and it has potential long term performance implications.

@daurnimator
Copy link
Owner Author

Thinking about this more: the reason I ended up with this structure is that I was avoiding pcall (pcall cannot be yielded over in lua 5.1).

@daurnimator daurnimator reopened this Sep 26, 2016
@coveralls
Copy link

coveralls commented Sep 26, 2016

Coverage Status

Coverage decreased (-0.1%) to 86.231% when pulling 3e7df50 on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Sep 26, 2016

Coverage Status

Coverage decreased (-0.1%) to 86.231% when pulling 3e7df50 on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Sep 28, 2016

Coverage Status

Coverage increased (+0.4%) to 86.699% when pulling b518bc4 on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Sep 28, 2016

Coverage Status

Coverage increased (+0.8%) to 87.13% when pulling ba69d79 on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage increased (+0.8%) to 87.179% when pulling 2c74f51 on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage increased (+0.5%) to 86.876% when pulling 21d6fba on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage increased (+0.7%) to 87.058% when pulling b7e086a on server-refactor into cd9364f on master.

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage increased (+0.7%) to 87.058% when pulling 79093e3 on server-refactor into cd9364f on master.

@daurnimator
Copy link
Owner Author

daurnimator commented Oct 4, 2016

  • A http2 connection reset can crash the server due to not passing errno over error in the http2 internal loop.

  • Current error handling can end up duplicating an error message, e.g.

    lua: examples/server_hello.lua:54: ./http/server.lua:165: wrap: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: starttls: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
    
  • Should support a 'version' parameter to the server constructor.

  - Now has a context argument (which could be server object, socket object, connection object or stream object)
  - Removed level argument
  - Made default function do nothing in non-server cases. This is more sensible than throwing an error for per-client issues
@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage increased (+0.8%) to 87.09% when pulling 8d84a38 on server-refactor into cd9364f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 87.168% when pulling d14f3eb on server-refactor into cd9364f on master.

@daurnimator daurnimator merged commit d14f3eb into master Oct 4, 2016
@daurnimator daurnimator deleted the server-refactor branch October 4, 2016 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants