2
0
Эх сурвалжийг харах

HttpNodeJs when no connection (#12137)

* Update HttpNodeJs.hx

Request can error when there is no connection

* passes error
M 5 сар өмнө
parent
commit
3644e6ac83

+ 3 - 1
std/haxe/http/HttpNodeJs.hx

@@ -123,7 +123,9 @@ class HttpNodeJs extends haxe.http.HttpBase {
 				req.setHeader("Content-Length", '${postBytes.length}');
 				req.write(Buffer.from(postBytes.getData()));
 			}
-
+		req.on('error', function(e) {
+            		onError(e);
+         	});
 		req.end();
 	}
 }