Skip to content

Commit

Permalink
Merge pull request NetrisTV#36 from HardBoiledSmith/DEV-13718
Browse files Browse the repository at this point in the history
DEV-13718 [라미엘] 세션 잠금 상태 메시지에 user-agent 표시
  • Loading branch information
yoonjs2 authored Jan 15, 2022
2 parents 7240031 + 23abfac commit ecfcd98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/server/goog-device/mw/WebsocketProxyOverAdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class WebsocketProxyOverAdb extends WebsocketProxy {
//
}

// TODO: HBsmith DEV-12387, DEV-12826, DEV-13214, DEV-13549
// TODO: HBsmith DEV-12387, DEV-12826, DEV-13214, DEV-13549, DEV-13718
private static async apiCreateSession(ws: WS, udid: string, userAgent?: string) {
const host = Config.getInstance().getRamielApiServerEndpoint();
const api = `/real-devices/${udid}/control/`;
Expand Down Expand Up @@ -116,8 +116,10 @@ export class WebsocketProxyOverAdb extends WebsocketProxy {
);
let msg = `[${this.TAG}] failed to create a session for ${udid}`;
if (!('response' in error)) msg = msg = `undefined response in error`;
else if (409 == error.response.status) msg = `사용 중인 장비입니다`;
else if (503 == error.response.status) msg = `장비의 연결이 끊어져있습니다`;
else if (409 == error.response.status) {
msg = `사용 중인 장비입니다`;
if (userAgent) msg += ` (${userAgent})`;
} else if (503 == error.response.status) msg = `장비의 연결이 끊어져있습니다`;
ws.close(4900, msg);
throw error;
});
Expand Down

0 comments on commit ecfcd98

Please sign in to comment.