message = Generators.queue(notify => {
const socket = new WebSocket(`wss://fathomless-inlet-57663.herokuapp.com/${username}`);
socket.onerror = () => notify(Promise.reject(new Error("socket error")));
socket.onclose = () => notify(Promise.reject(new Error("socket closed")));
socket.onmessage = event => notify(JSON.parse(event.data));
return () => socket.close();
});