server: Fix accidental crashing bug xD
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
4560d20b04
commit
fa38c2928b
2 changed files with 3 additions and 1 deletions
|
@ -7,10 +7,12 @@ export function run(http, orgPort, ctx) {
|
||||||
let packageInfo = JSON.parse(readFileSync(packagePath))
|
let packageInfo = JSON.parse(readFileSync(packagePath))
|
||||||
|
|
||||||
const server = http.createServer(function (req, res) {
|
const server = http.createServer(function (req, res) {
|
||||||
|
const d1 = new Date().getTime()
|
||||||
let finishedRequest = false
|
let finishedRequest = false
|
||||||
var done = function () {
|
var done = function () {
|
||||||
if (finishedRequest) return
|
if (finishedRequest) return
|
||||||
finishedRequest = true
|
finishedRequest = true
|
||||||
|
var requestTime = new Date().getTime() - d1
|
||||||
|
|
||||||
let level = 'debug'
|
let level = 'debug'
|
||||||
if (res.statusCode >= 400) {
|
if (res.statusCode >= 400) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sc-helloworld",
|
"name": "sc-helloworld",
|
||||||
"version": "2.0.3",
|
"version": "2.0.4",
|
||||||
"description": "Hello World app for service core",
|
"description": "Hello World app for service core",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue