ws: close code