extend/cowboy — Issue #81: cowboy_acceptors will not get updated with OTP relups
Author: ferd
Created: 2011-10-28 16:19:05+00:00
State: open

An improvement on the previous behaviour was introduced in: https://github.com/extend/cowboy/commit/d9da5334d251c95273fd20475f18d19fd3eb37ef

The problem is that right now, the module tuple for the supervisor is []. When the OTP release handler will try to upgrade code, it will navigate through the OTP supervision tree and ask all of the supervisors to tell them what kind of code their children is running. By leaving it to an empty list, the module will be ignored and not upgraded.

To fix this, the module name must be added to the empty list ([cowboy_acceptor]). However, the acceptors are blocking operations and will be killed after a while if they do not reply to the gen_server's requests.

The behaviour of the acceptors should be changed to accept only for a few (milli)seconds at a time, look for new messages (including upgrade ones, coming from the `sys` module), react to them, and then start accepting over again.