bugfix 웹소켓 연결시 verinfo 에서 수집된 serverIP 정보로 접속하도록 수정.
This commit is contained in:
parent
f47ebc11d6
commit
fb35b84a65
|
@ -153,7 +153,7 @@ export const environment: Environment = {
|
|||
protocolModuleConfig: {
|
||||
hostConfig: {
|
||||
protocol: 'ws',
|
||||
domain: 'dstalk.daesang.com',
|
||||
domain: 'messenger2.daesang.com',
|
||||
port: 8080
|
||||
},
|
||||
urls: protocolUrls,
|
||||
|
|
|
@ -72,9 +72,16 @@ export class ProtocolService {
|
|||
public connect(serverIp: string | null = null): Observable<void> {
|
||||
return new Observable<void>(subscriber => {
|
||||
try {
|
||||
this.socket$ = makeWebSocketObservable(
|
||||
`${this.urls.base}${serverIp ? serverIp : ''}`
|
||||
);
|
||||
let url = this.urls.base;
|
||||
if (!!serverIp && serverIp.length > 0) {
|
||||
url = `${
|
||||
this.moduleConfig.hostConfig.protocol
|
||||
}://${serverIp}:${String(this.moduleConfig.hostConfig.port)}`;
|
||||
}
|
||||
|
||||
// console.log(`${this.urls.base}${serverIp ? serverIp : ''}`);
|
||||
// console.log(url);
|
||||
this.socket$ = makeWebSocketObservable(url);
|
||||
this.messages$ = this.socket$.pipe(
|
||||
switchMap(getResponses => {
|
||||
subscriber.next();
|
||||
|
|
Loading…
Reference in New Issue
Block a user