preparing onSocket release