nect%28%29%5D&labels=documentation&body=Documentation+under+heading+%22peer_plugin%3A%3A%5Bon_disconnect%28%29%5D%22+could+be+improved">report issue</a>]</span></div>
<div class="section" id="on-disconnect">
<h2>on_disconnect()</h2>
<pre class="literal-block">
virtual void <strong>on_disconnect</strong> (error_code const&amp;);
</pre>
<p>called when the peer is being disconnected.</p>
<a name="on_connected()"></a><span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs: