code: function closeExtension(done) {
              var extension = self.extension;
  
              if (extension && !extension.closed) {
                  extension.removeListener('error', handlers.relayError);
  
                  extension.close(done);
              } else {
                  done(null);
              }
          }
docs: close extension Note: this is called after chromium close since the server won't emit close before all connected TCP sockets are dead