destroy method

void destroy(
  1. dynamic socket
)

Called upon a socket close.

@param {Socket} socket

Implementation

void destroy(socket) {
  connecting.remove(socket);
  if (connecting.isNotEmpty) return;

  close();
}