Double underscored values are name mangled in the scope they are declared or referenced in. You need to reference self._BaseServer__is_shut_down
(and self._BaseServer__shutdown_request
for that matter) or alias the attribute from the base class scope in the derived class scope.
@isedev has a point about avoiding interacting directly with dunderscored pseudo-privates though. Unless you have a compelling need to instrument every single loop through the request listener, you might be better served overriding _handle_request_noblock
, which will still let you instrument every request that is processed at a single point, but without having to interact directly with the server state.