Skip to content

Commit

Permalink
fix: utp stop
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Dec 23, 2024
1 parent 89565f2 commit 55fee6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.24
github.com/optimism-java/utp-go v0.0.0-20241220063931-e7f66577a96c
github.com/optimism-java/utp-go v0.0.0-20241223124724-19352018cc52
github.com/protolambda/bls12-381-util v0.1.0
github.com/protolambda/zrnt v0.32.3
github.com/protolambda/ztyp v0.2.2
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ github.com/optimism-java/shisui v1.14.6-0.20241223065521-fe0986aca609 h1:Jriowqb
github.com/optimism-java/shisui v1.14.6-0.20241223065521-fe0986aca609/go.mod h1:iRpLj7SCldtgT/7/p8YZVwor0qCfukfyi12azji/bo0=
github.com/optimism-java/utp-go v0.0.0-20241220063931-e7f66577a96c h1:eyOa3zWzO+RAQGWq6V91mgCybfsuROLJZxuQpY+/Nbg=
github.com/optimism-java/utp-go v0.0.0-20241220063931-e7f66577a96c/go.mod h1:dJZNMUlyNpjM2VkUEHhmFprLei6gCg3r7U9qj9MmJNQ=
github.com/optimism-java/utp-go v0.0.0-20241223023954-dac5386d1424 h1:OM23WGNMteIkM7IXzkGtoL+X//sFHy3M5LhrqTfvEuY=
github.com/optimism-java/utp-go v0.0.0-20241223023954-dac5386d1424/go.mod h1:dJZNMUlyNpjM2VkUEHhmFprLei6gCg3r7U9qj9MmJNQ=
github.com/optimism-java/utp-go v0.0.0-20241223124724-19352018cc52 h1:5wq4o4t/umlNii796cEwNyhIT6KefKZv0uUEE6OJjvA=
github.com/optimism-java/utp-go v0.0.0-20241223124724-19352018cc52/go.mod h1:dJZNMUlyNpjM2VkUEHhmFprLei6gCg3r7U9qj9MmJNQ=
github.com/optimism-java/zrnt v0.32.4-0.20240415084906-d9dbf06b32f7 h1:ZTQWXQ8xblCRUXhZs3h5qrBMSAHe8iNH7BG7a7IVFlI=
github.com/optimism-java/zrnt v0.32.4-0.20240415084906-d9dbf06b32f7/go.mod h1:A0fezkp9Tt3GBLATSPIbuY4ywYESyAuc/FFmPKg8Lqs=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
Expand Down
8 changes: 5 additions & 3 deletions portalwire/portal_utp.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ func (p *PortalUtp) Start() error {
}

func (p *PortalUtp) Stop() {
err := p.listener.Close()
if err != nil {
p.log.Error("close utp listener has error", "error", err)
if p.listener != nil {
err := p.listener.Close()
if err != nil {
p.log.Error("close utp listener has error", "error", err)
}
}
p.discV5.Close()
}
Expand Down

0 comments on commit 55fee6f

Please sign in to comment.