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