Use also a promise for closeHandler on WebSocket