Flush an error to any pending promises on disconnect

Helps #3