socketry / async-websocket

Asynchronous WebSocket client and server, supporting HTTP/1 and HTTP/2 for Ruby.
MIT License
166 stars 18 forks source link

0.22.0: zlib(finalizer): the stream was freed prematurely #42

Closed zhulik closed 1 year ago

zhulik commented 1 year ago

Hello,

after updating to 0.22.0 from 0.19.2 and making adjustments for the new read/write interface I started getting warnings from zlib:

zlib(finalizer): the stream was freed prematurely.

Besides that my code works as expected.

I couldn't precisely trace what exactly causes printing of this warning, do you have any ideas where I can start from?

Thanks!

zhulik commented 1 year ago

Some updates: warning is only shown with ruby 2.7 and 3.0, 3.1 is not affected. This PR in zlib simply disables warnings https://github.com/ruby/zlib/pull/30. I assume we can't do anything but updating ruby to 3.1

ioquatix commented 1 year ago

Yeah I removed that message from the CRuby native extension for zlib. Thanks for confirming the fix!