def closed(self, code, reason=None):
if code != <NUM_LIT:1000>:<EOL><INDENT>self._error = errors.SignalFlowException(code, reason)<EOL>_logger.info('<STR_LIT>',<EOL>self, code, reason)<EOL>for c in self._channels.values():<EOL><INDENT>c.offer(WebSocketComputationChannel.END_SENTINEL)<EOL><DEDENT><DEDENT>self._channels.clear()<EOL>with self._connection_cv:<EOL><INDENT>self._connected = False<EOL>self._connection_cv.notify()<EOL><DEDENT>
Handler called when the WebSocket is closed. Status code 1000
        denotes a normal close; all others are errors.