Added corresponding code for Swiftiply "close" protocol.