知らないことを調べた結果を蓄積する

web3 使ってコントラクトのファンクションを『send』処理したあとに
『UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1):
 Error: Can't set headers after they are sent.』
がでる。
原因を調べてみると、各、".on()"の処理後に、
res.send("xxxx")
と終了処理していたが、これではきっちり処理が終了しないらしく、
return res.send("xxxx")
と書かないといけいない。
タグ

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

管理人/副管理人のみ編集できます