Skip to content

Commit

Permalink
feature(import) add nameStore
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Aug 25, 2018
1 parent 7981d4a commit 6599bc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/distribute/import.js
Expand Up @@ -89,6 +89,7 @@ module.exports = (options, fn) => {
const close = closeIfNot(socket, importListen);

const statusStore = fullstore();
const nameStore = fullstore();
const statusStoreWraped = wraptile(statusStore);

const onConfig = apply(squad, [
Expand All @@ -113,7 +114,10 @@ module.exports = (options, fn) => {
]);

const onConnect = emitAuth(importUrl, socket);
const onAccept = logWraped(importStr,`${connectedStr} to ${colorUrl}`);
const onAccept = apply(squad, [
logWraped(importStr,`${connectedStr} to ${colorUrl}`),
nameStore,
]);
const onDisconnect = apply(squad, [
done(fn, statusStore),
logWraped(importStr, `${disconnectedStr} from ${colorUrl}`),
Expand Down

0 comments on commit 6599bc9

Please sign in to comment.