Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
creasy2010 committed Jun 28, 2018
2 parents 7a60a78 + a9d9d5c commit b59f48b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .gitignore
@@ -1,4 +1,7 @@
.idea
.project
.settings
.classpath
# Logs
logs
*.log
Expand Down Expand Up @@ -41,4 +44,4 @@ logs
*.iml
target
es6
es7
es7
10 changes: 5 additions & 5 deletions examples/hello-koa/dubbo/dubbo.js
Expand Up @@ -11,11 +11,11 @@ const dubbo = (module.exports = new Dubbo({
// console.log('dubbo was ready');
// });

dubbo.subscribe({
onTrace: msg => {
console.log(msg);
},
});
// dubbo.subscribe({
// onTrace: msg => {
// console.log(msg);
// },
// });

//cost middleware
/*dubbo.use(async function costTime(ctx, next) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dubbo/package.json
@@ -1,6 +1,6 @@
{
"name": "dubbo2.js",
"version": "2.1.4",
"version": "2.1.5",
"main": "./es7/index.js",
"types": "./es7/typings/index.d.ts",
"license": "Apache Licence 2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/dubbo/src/byte.ts
Expand Up @@ -30,7 +30,8 @@ export const fromBytes4 = (buf: Buffer) => {

export const toBytes8 = (num: number) => {
const buf = Buffer.allocUnsafe(8);
const high = Math.floor(num / Math.pow(2, 32));
//2 ** 32 = 4294967296
const high = Math.floor(num / 4294967296);
const low = (num & 0xffffffff) >>> 0;
buf.writeUInt32BE(high, 0);
buf.writeUInt32BE(low, 4);
Expand Down
8 changes: 4 additions & 4 deletions packages/dubbo/src/zookeeper.ts
Expand Up @@ -21,10 +21,10 @@ import zookeeper from 'node-zookeeper-client';
import qs from 'querystring';
import Context from './context';
import DubboUrl from './dubbo-url';
import {ZookeeperDisconnectedError, ZookeeperTimeoutError} from './err';
import {to} from './to';
import {IObservable, IZkClientProps, IZookeeperSubscriber} from './types';
import {isDevEnv, msg, noop, traceErr, traceInfo} from './util';
import { ZookeeperDisconnectedError, ZookeeperTimeoutError } from './err';
import { to } from './to';
import { IObservable, IZkClientProps, IZookeeperSubscriber } from './types';
import { isDevEnv, msg, noop, traceErr, traceInfo } from './util';

const log = debug('dubbo:zookeeper');
const ipAddress = ip.address();
Expand Down

0 comments on commit b59f48b

Please sign in to comment.