Skip to content

Commit

Permalink
[bug]:fix udp socket close twice #80
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie-zeng committed Mar 6, 2025
1 parent 76dd50d commit 878d832
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/doip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class DOIP {
generalTimeout = 5 * 60 * 1000
inverseVersion = 0xfd
maxProcessSize = 4000
private udp4Server: dgram.Socket
private udp4Server?: dgram.Socket
private server?: net.Server
log: DoipLOG
udsLog: UdsLOG
Expand Down Expand Up @@ -213,6 +213,7 @@ export class DOIP {
'error'
)
this.udp4Server?.close()
this.udp4Server = undefined
})
udp4Server.bind(13400, this.eth.handle)

Expand Down

0 comments on commit 878d832

Please sign in to comment.