Issues/320

Terminate connection logic if client has already had 'end' called on it.

This closes #320