Commit d32d762d authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

app termination fixes

parent 5a9b7007
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -683,6 +683,9 @@ func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) {
	}

	go func() {
		// Wait to allow app termination response to be sent
		time.Sleep(20 * time.Millisecond)

		// Deregister service
		_ = deregisterService(serviceAppInstanceId, appEnablementServiceId)

@@ -695,13 +698,6 @@ func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) {
		}
	}()

	if sendAppTerminationWhenDone {
		go func() {
			//ignore any error and delete yourself anyway
			_ = sendTerminationConfirmation(serviceAppInstanceId)
		}()
	}

	w.WriteHeader(http.StatusNoContent)
}

+3 −0
Original line number Diff line number Diff line
@@ -3858,6 +3858,9 @@ func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) {

	//using a go routine to quickly send the response to the requestor
	go func() {
		// Wait to allow app termination response to be sent
		time.Sleep(20 * time.Millisecond)

		// Deregister service
		_ = deregisterService(serviceAppInstanceId, appEnablementServiceId)

+3 −0
Original line number Diff line number Diff line
@@ -686,6 +686,9 @@ func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) {
	}

	go func() {
		// Wait to allow app termination response to be sent
		time.Sleep(20 * time.Millisecond)

		// Deregister service
		_ = deregisterService(serviceAppInstanceId, appEnablementServiceId)

+3 −0
Original line number Diff line number Diff line
@@ -529,6 +529,9 @@ func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) {
	}

	go func() {
		// Wait to allow app termination response to be sent
		time.Sleep(20 * time.Millisecond)

		// Deregister service
		_ = deregisterService(serviceAppInstanceId, appEnablementServiceId)