code: func (p *Pubsub) resubscribe(write *writePump) {
  	timer := gaugeLatency(PromReconnectLatency)
  	PromReconnections.Inc()
  
  	p.subsMu.Lock()
  	defer p.subsMu.Unlock()
  
  	for kind, recs := range p.subs {
  		if recs == nil {
  			continue
  		}
  
  		for _, ev := range recs.getList() {
  			write.Data() <- command{
  				command: EventType(kind).SubCommand(),
  				channel: ev.name,
  			}
  		}
  	}
  
  	timer()
  }
docs: // resubscribe flushes the `send` queue and replaces it with commands
  // to resubscribe to all previously-subscribed-to channels. This will
  // NOT block until all subs are resubmitted, only until we get a lock.