fix get_or_create_sp() that may cause a dead lock

@whirm This is the problem. If ```not self.done``` is false, then the ```sesslock``` will be not be released.