ws-process 0.3.46 → 0.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -89,8 +89,14 @@ function getWebSocket() {
|
|
|
89
89
|
close()하면 onmessage 이벤트핸들러가 실행중에 중단되어
|
|
90
90
|
프로그램이 정상적으로 동작하지 않는다.
|
|
91
91
|
*/
|
|
92
|
-
if (
|
|
93
|
-
//
|
|
92
|
+
if (
|
|
93
|
+
(isPreviewMode() && !existWS.url.endsWith('/dev')) // preview mode
|
|
94
|
+
|| (
|
|
95
|
+
!isPreviewMode()
|
|
96
|
+
&& existWS.url.endsWith('/dev')
|
|
97
|
+
&& window.location.hostname !== 'localhost'
|
|
98
|
+
) // not preview mode
|
|
99
|
+
) {
|
|
94
100
|
if (existWS.readyState === existWS.OPEN) {
|
|
95
101
|
// existWS.close();
|
|
96
102
|
local.dispatch(removeWSInstance(existWS, true));
|