Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • User Account User Account
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • User AccountUser Account
  • Merge requests
  • !119
An error occurred while fetching the assigned milestone of the selected merge_request.

fixed double callbacks causing ERR_HTTP_HEADERS_SENT

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Wolfgang Knopki requested to merge MLAB-566-fix into testing 3 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

quickfix to fix ERR_HTTP_HEADERS_SENT, probable cause: double callback

  • Wolfgang Knopki @knopkiwg assigned to @knopkiwg 3 years ago

    assigned to @knopkiwg

  • Wolfgang Knopki @knopkiwg mentioned in commit ed931d02 3 years ago

    mentioned in commit ed931d02

  • Wolfgang Knopki @knopkiwg merged 3 years ago

    merged

  • Loading
  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • testing (base)

and
  • latest version
    63dcd534
    1 commit, 3 years ago

1 file
+ 16
- 15

    Preferences

    File browser
    Compare changes
functions/methods.ts
+ 16
- 15
  • View file @ 63dcd534

  • Edit in single-file editor

  • Open in Web IDE


@@ -60,7 +60,6 @@ var methods = {
})
});
});
callback(err)
});
callback(err)
})
@@ -165,27 +164,29 @@ var methods = {
return null
},
verifyUserAccount: function(userData:any, callback:any) {
dbconn.user.beginTransaction(function(err:any) { // START TRANSACTION
if (err) { throw err }
// update user status
dbconn.user.query('UPDATE user SET ? WHERE id =' +userData.id, userData, function (err:any, rows:any, fields:any) {
if (err) {
return dbconn.user.rollback(function() { throw err })
}
// delete verification token
dbconn.user.query('DELETE FROM verification WHERE user_id = '+userData.id, function (err:any, rows:any, fields:any) {
dbconn.user.getConnection(function(err:any, thisconn){
thisconn.beginTransaction(function(err:any) { // START TRANSACTION
if (err) { throw err }
// update user status
thisconn.query('UPDATE user SET ? WHERE id =' +userData.id, userData, function (err:any, rows:any, fields:any) {
if (err) {
return dbconn.user.rollback(function() { throw err })
return thisconn.rollback(function() { throw err })
}
// COMMIT
dbconn.user.commit(function(err:any) {
// delete verification token
thisconn.query('DELETE FROM verification WHERE user_id = '+userData.id, function (err:any, rows:any, fields:any) {
if (err) {
return dbconn.user.rollback(function() { throw err })
return thisconn.rollback(function() { throw err })
}
// COMMIT
thisconn.commit(function(err:any) {
if (err) {
return thisconn.rollback(function() { throw err })
}
})
})
})
})
callback(err)
callback(err)
})
},
/* ===== GitLab ===== */
Assignee
Wolfgang Knopki's avatar
Wolfgang Knopki
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: MLAB-566-fix

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal