def send_stream_tail(self):
with self.lock:<EOL><INDENT>if not self._socket or self._hup:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>data = self._serializer.emit_tail()<EOL>try:<EOL><INDENT>self._write(data.encode("<STR_LIT:utf-8>"))<EOL><DEDENT>except (IOError, SystemError, socket.error) as err:<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>.format(err))<EOL><DEDENT>self._serializer = None<EOL>self._hup = True<EOL>if self._tls_state is None:<EOL><INDENT>try:<EOL><INDENT>self._socket.shutdown(socket.SHUT_WR)<EOL><DEDENT>except socket.error:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>self._set_state("<STR_LIT>")<EOL>self._write_queue.clear()<EOL>self._write_queue_cond.notify()<EOL><DEDENT>
Send stream tail via the transport.