This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
Monitors in Reactor seem to accumulate for IO Objects indefinitely (until actor dies or is terminated) #118
Labels
Milestone
It seems that the reactor used in the celluloid-io mailbox only ever creates monitors (and keeps those references in
@monitors
).The assignment happens here: https://github.com/celluloid/celluloid-io/blob/master/lib/celluloid/io/reactor.rb#L49
I am however unable to find that those monitors are ever cleaned up again for a given io object.
Specifically i am trying to deal with a new TCPSocket which fails on initialize. This is used for having one actor establishing a connection to some remote host and reconnecting by itself (without letting the actor die!) and reestablishing a new connection.
I tried, naively, to approach this by having some sort of 'unwait' mechanism telling the reactor to stop monitoring an io resource: https://github.com/monolar/celluloid-io/commit/ede7cda79a56af699d3710b3645c5f85ab1dce1f
The cleanup not happeing has the main problem of file-descriptors leaking and the secondary problem of socket objects remaining referenced (by the reactor) leading to them not being GC'd.
The text was updated successfully, but these errors were encountered: