samples icon indicating copy to clipboard operation
samples copied to clipboard

fix: abort handler manually after abnormal closure

Open nichtsen opened this issue 3 years ago • 0 comments

i had ran the chatroom example on my local machine, however, when user closed the tab on browser, the handler just crashed with the following logs:

`[panic.go:838] the request url is /ws/join

[panic.go:838] Handler crashed with error can't find templatefile in the path:views/websocketcontroller/join.tpl `

it seems that beego trys to find template and render after /ws/join handler return, which is not neccessary in the case. Instead, abort handler manually is suitable.

nichtsen avatar Jun 03 '22 06:06 nichtsen