restsructuring WSP proxy to handle disconnects better