orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
273 stars 40 forks source link

fixed all tests on x86 GNU/voidlinux #167

Closed Plisp closed 5 years ago

Plisp commented 5 years ago

All tests now run on my system and hopefully everywhere else too. Summary of changes:

This closes https://github.com/orthecreedence/cl-async/issues/139 and https://github.com/orthecreedence/cl-async/issues/137. Also note that https://github.com/orthecreedence/cl-async/issues/65 is possibly already solved.

Plisp commented 5 years ago

Removed :export symbols for deprecated fd api. https://github.com/orthecreedence/cl-async/issues/63 is irrelevant with pollers (and tests) implemented and may be closed.

Plisp commented 5 years ago

Hmm...in ssl/tcp.lisp, the note on attach-ssl-to-socket says Note that this function *really* should be called before the passed socket is connected, and certainly before any data is exchanged over it. which is alarming since on L402, before the connection happens, ssl-run-state is called, which could (maybe) call write-socket-data with a non-nil :end kwarg, which would pass that arg to streamish-write, dispatched on ssl-socket. However write-ssl is NIL, control flows to call-next-method on L99, calling streamish-write dispatching on socket. Now since the socket is not connected, and the user has switched *buffer-writes*, control passes to call-next-method on L165, calling write-to-uvstream, which ignores the :end argument. Doh!

Plisp commented 5 years ago

Oh nvm that call's in the wrap-connect-cb which is executed strictly after setting socket-connected to T. You were right ;) Oh well at least the style-warnings are gone.

orthecreedence commented 5 years ago

Thank you!