small changes
This commit is contained in:
parent
2671dda661
commit
ff94e53a58
2 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ export const remote1 = {
|
||||||
let server = await outbagURLfromTag(data.server);
|
let server = await outbagURLfromTag(data.server);
|
||||||
try {
|
try {
|
||||||
var cert = await getRemote(server);
|
var cert = await getRemote(server);
|
||||||
var tagAcert = `${data.name}@${server.host}:${server.port}-${data.publicKey}`
|
var tagAcert = `${data.name}@${server.host}:${server.port}-${data.publicKey}`;
|
||||||
if (!(await verify(tagAcert, data.sign, cert))) {
|
if (!(await verify(tagAcert, data.sign, cert))) {
|
||||||
client.suspect();
|
client.suspect();
|
||||||
aws("error", "signature");
|
aws("error", "signature");
|
||||||
|
|
|
@ -36,8 +36,8 @@ export class wsClient {
|
||||||
try {
|
try {
|
||||||
this.activeRequests++;
|
this.activeRequests++;
|
||||||
let msgStr = msg.toString();
|
let msgStr = msg.toString();
|
||||||
debug("WebSocket", "reveived:", msgStr);
|
|
||||||
let json = JSON.parse(msgStr) as { act: string, id: number, data: any };
|
let json = JSON.parse(msgStr) as { act: string, id: number, data: any };
|
||||||
|
debug("WebSocket", "reveived:", json);
|
||||||
if (!this.open) {
|
if (!this.open) {
|
||||||
socket.send(JSON.stringify({
|
socket.send(JSON.stringify({
|
||||||
id: json.id,
|
id: json.id,
|
||||||
|
|
Loading…
Reference in a new issue