websocket: fix Timer not returning after close of socket